Issues with keeppass2 over webdav content does not match etc

I have run quite normal nextcloud several years for now but I quite often get issues e.g. with keeppass2 synchronization over webdav.

e.g. I might get

The new file’s content does not match the data that KeepPass has written, i.e. writing to the file has failed and might be corrupted now. …

I have tried several ways to fix / trying to figure out how could I reduce this.

I think I also get issues with *.tmp file keeppass2 uses.

How should I figure out my head around this, so what kind of aproach or trying working solution on this?

I have looked from the logs but have sofar not figured out the root cause nor fix on this. Can provide more details but thought maybe this is just more general easier to fix issue and I’m not noticing something obvious what I’m doing wrong.