I also had a git repo inside gdrive (for convenience as of keeping code along with other stuff), somehow gdrive managed to corrupt itself to the point where some files inside the project got corrupted and inaccessible locally (cloud version remained). The only solution was to delete the gdrive cache and db.
Plus, paths inside gdrive end up including "my drive", where the space is a problem with some tools (Flutter).
And, you also end up syncing .venv (as an example for python) and other temp files as gdrive has no exclude patterns.
Therefore after sorting the situation in my own repo caused by this combination, I moved the repo into it's own folder.
Maybe it's one datapoint, but in my case, this combination got corrupted and wasted time.