How to recover from file sync error due to locked file?

I frequently run into an issue where a file that once fails to sync to a machine due to the file being locked will never sync again.

For example when I edit a file on a first machine that is still open (in e.g. Excel) on a second machine. The file will fail to sync to the second machine due to the file being locked, which makes sense.

However, even after I close the program that holds the lock, the file will never sync again. Not by waiting, not by clearing the file sync error. Even when making further changes to the file on the first machine or deleting the file entirely from the second machine. On the web version the file changes display fine.

The only way I can fix this state is removing the entire library and re-syncing it again. If I don’t notice it, I end up in a split brain situation with diverging files between the two machines.

This is on Mac, currently version 8.0.10 but I’ve been having this problem for years in different versions.

Is there any other way to resolve this than removing and re-syncing the entire library again?