I have my desktop in the iCloud. On a regular basis, my iCloud comes to a point where it wants to upload every single file again, so it sets every existing file on "Waiting for upload", and takes 3 – 5 days to reupload everything. I don’t know what causes this, it comes out of the blue sometimes. During that time, I can’t copy files, and can’t open some programs like Xcode. How can I avoid this?
I'm sorry you're seeing this issue. Can you please install the iCloud Drive debug profile from here: https://developer.apple.com/bug-reporting/profiles-and-logs/
Then reproduce the issue and file a bug report at https://feedbackassistant.apple.com. This will help us get to the bottom of what's going on.