Ah yeah, from the chown it seems it is necessary for GitLab to start, but maybe not all at once.
If the command is run twice, once with depth 1 to allow GitLab to start, then later full depth if needed; that should solve the startup delay.
If there's any changes to the container/updates those permissions reset.