Cloud services sometimes remove files from the device to save space, leaving only a placeholder (which when opened downloads and opens the file). That causes problems with Obsidian, which expects the actual file to always be present.
If this is what’s happening to your vault, the service may have a setting to keep files downloaded (you’d want to apply it to your vault folder).
I have been exploring the issue further and I have looked into cloud. I have discovered it is not a cloud issue as I thought. There is something going on with Obsidian.
I turned off and unsynced the main folder. Then, I downloaded plugins and a theme, tested them, and then rebooted. Once again, the plugin and theme folders were removed.
I would guess the problem is coming from outside of Obsidian, but you can try searching the forum to see if anyone has had (and hopefully solved) a similar problem.