I use OneDrive for syncing and I create symlinks pointing to the Documents and Desktop folders in my OneDrive. I replace the default MacOS folders with the symlinks in order to make syncing of those automatic.
Up until Catalina, this worked great. However, now every time I log in these symlinks are replaced with local folders. Just the Documents and Desktop, not Downloads.
Any idea what new security feature is probably causing this? Any suggestions/workarounds?
This is pretty standard behaviour for the past several years. When Mac OS X first came out, it was much more of a pure UNIX operating system and people often hacked up the internals with symlinks. But this hasn't been safe for at least a decade. The only change now is that Documents and Desktop have become "special" folders that can no longer be hacked up like that.
The only workaround is not to do that. Apple supports Documents and Desktop syncing with iCloud Drive. Whether that feature works or not is an entirely different question. Given that many users will have this feature enabled, Microsoft is wise to not allow it as chaos would ensure in about 12 milliseconds. See if you can hack up OneDrive in some other fashion.