Hello!
My name is David N. I am a Windows fan and advise people here with Windows questions. I will be happy to assist you with your issue.
The issue here is that you are confusing storage or backup with sync.
The purpose of sync is not to protect files from deletion. In fact, it is part of its job to ensure that files are deleted.
The purpose of sync is to ensure that the folders which are being synced are effectively the same folder everywhere sync is used. If you log into a Microsoft account when you use Windows, sync connects your folders, by default Desktop, Documents, and Pictures so that they have the same exact contents on OneDrive as on the computer that you logged into. If you use the same account to log into a second computer, its Desktop, Documents, and Photos have the same files.
Unfortunately, this means that if you delete a file from any of these folders, that file is deleted from all of them. This is how sync works and is by design.
To ensure that you keep files, you will want to store them in a non-synced location. This can be on your local drive, in OneDrive storage, or on another drive or cloud service. You can also set up backups, even backups of synced folders. The synced folders will be backed up, and since the backups are not synced their contents will not be deleted.
I hope this helps! Please let me know if this resolves your issue or if you require additional assistance.
Regards,
David N.