Not exactly. Inside the docker container, the files you have bind–mounted will be owned by the same user who runs the git binary. You’ll never even notice the security check.
Today I'm sitting here staring at a 'fatal: unsafe repository warning' in my local workspace in docker and can tell you definitively that I have noticed.