I’ve rarely had nextcloud office work well, to the point that I’ve given up. That said, it’s supposed to work through the web interface to properly track different users and changes like a google doc. Opening up the file in libreoffice/collabora on desktop is a different process and works just as normally opening a file on your computer, including creating the lock files. I don’t think there’s a way to use a desktop office suite with nextcloud office to leverage the collaborative aspect of it.
Now that I think about it, I don’t think any collaborative office suite has figured that out without it actually being a web app disguised as a desktop app.
The lock file is there to prevent another person from opening up the document at the same time as you, when you save the document in your desktop app, close it then let it sync, is the document still wiped or are you and you open it with the correct changes on your other devices?
I’ve not had any issues with file syncing on desktop. Android has a few issues due to google screwing with permissions and making it unable to sync all file types through nextcloud, but I don’t recall having any issues with collabora on my phone syncing. Nextcloud does seem to have full file sync permissions in it’s android/media/etc. folder, and that’s where I open my documents from, so if you’re not opening your files from there, maybe that’s the issue.