Cannot check out master branch when build runs on shared runners

I’ve setup CI jobs to release new versions of my software and in doing that the build job needs to create a commit in master with the bumped version number.
This used to work but since around March 25 it stopped working when builds run on shared runners. If I add my own runner then the build succeeds.

Here’s an example of such build failing

Here’s an example of the same build executing on my own runners and passing

It seems that the local master branch does not exist anymore so what I ended up ignoring the failure fo the command to remote it.