>Interesting that this thread started a year and a half ago and there doesn't appear to be a clear solution. I'm running in to the same problem and actually have spent some time trying to isolate the problem since it's not happening in every single situation.
Ohh OneDrive really hasn't improved much in that time :-( All my clients have a shared IT account on there and I occasionally I logon many months, sometimes years. I did that just last night to a laptop that I probably last logged onto about a year ago.
OneDrive merrily starting restoring long deleted files and folders. I know it does this now so before logging onto *any* old computer, I run a PowerShell script that backs up my OneDrive to a network folder. I then let OneDrive cock everything up. Watching as long deleted files are restored back. Often a bit of a trip down memory lane. When it's finished, I run a reverse PowerShell script to restore the backup to what it should be.
I stand by my observation that OneDrive's core algorithms over "latest version"/whatever are fundamentally flawed. Never had this problem with Google Drive or Dropbox.
I have two BIG gripes with M365 - one is OneDrive and the other is the total lack of recognition that there are 3rd party editing apps out there that users may want to open documents direct from SharePoint.