The 'map network drive' method that was explained earlier in this thread has helped me with this.
I had files open on Friday 7th June, and when I came back on Monday, they were still open, but they had completely disappeared from the shared folder that I use, along with every other file from about the past week! Older files still worked in the desktop shared folder, but I unlinked and relinked OneDrive and everything disappeared... Luckily the folders/files are intact for the user who is sharing them.
Then I noticed a link with the same name as the shared folder, and I was able to access the files in the web interface briefly. Now, the link takes me to a loop of 'this folder is empty' and 'the provided drive ID appears to be malformed.' The shared folder doesn't even show up in the web browser interface at all. However, I can access the files online if I copy the link into a private/incognito window and log in there!
(I think the Microsoft 365 app might have helped me get the link, but it's been a while)
Anyway, this fix has restored most of the functionality I need. Microsoft Office (Word and Excel mainly) are still able to open and work with shared files as normal, using the 'recent files' area. And they use the 'd.docs.live.net' paths when saving files (which in the past has felt slow and annoying). The 'save a copy -> browse' option opened a window and the folder path at the top gave me the right URL for the shared folder. So I copied that into 'map network drive' (should be easy to find on the start menu) and logged in with my OneDrive login details, and I can access all the files again, upload new ones. It's probably a little more limited than it used to be but it's working alright now.
It's basically'd.docs.live.net' and then a forward slash and then the string of numbers and lowercase letters after "cid" on the URL that the shared folder link points to. Probably needs the 'https://' at the start as well.
I hope this helps someone and isn't too confusing.