So I tried it again, and it failed again, but I now know why! I was testing out your docker container to see if it would work properly. I would be syncing ~14TB, but I didn't want to download everything, as I wanted to transfer my files over from my other computer and then sync (keep any significant downloads from occuring). In order to keep from wasting my time transferring all that to find it just messed everything up, I wanted to test it out. As it started to download a certain amount, I ended up stopping the docker container. What I found, after reading through your scripts, was that the permissions modification was only occurring once the sync completes (that's a long time to wait if I tried to download 14TB). This would NOT be normal scenario, but because I was stopping the docker, the chmod was not occurring on the mount point. I ended up causing my own problem. Once I setup a very tiny sync, the process worked as expected.
Like you said, this is not ideal, but it works (knowing the limitations). I still think figuring out how to pass the PUID and PGID would make this just write as the appropriate user from the start and avoid this from the beginning. If I get some time to dabble in it, I can assist, but I have zero experience with docker, not to mention how Unraid, Docker Hub, and GitHub all work together. If you have a little tutorial on how you initially got it setup, I can mess around with my own setup until I figure it out. I would like to help you get this resolved, as I love the sync client over rclone setups.