This is so daft. Microsoft is a huge developer of PC software. Cornerstone of Windows 11 is OneDrive. It doesn't synchronise files. The main thing it needs to do!
So a clue to the maintenance programmers.
For hours I tried all the ideas above here and hit a wall every time so I went into maintenance program mode. Isolate the problem.
My file was created on PC1. It shows on OneDrive online and can be opened in Excel online.
It is not shown on PC2 in OneDrive. 4 hours later it still is not shown but I can see it in OneDrive online on PC2.
Ok download it, then move it to its correct location on my local disk on PC2. Make a small change. Look on PC1 and it has synched. Make a small change on PC1 and then check back on PC 2. It has synched.
So the problem lies in the PC code that finds new files on the server. Now reproduce this on your development system Add some trace code and figure it out. If you can't reproduce it. Find an irate user like me. Ask if I can run some test code for you!
Basic life as a maintenance coder. The life blood of the industry. Fix the little things then all the big things will work.