"Could not rename partial file" in sftp mount

I have a docker container running an sftp server. This docker container has a file mounted into it, which is accessible by the sftp user. I have mounted the SFTP server with Dolphin, and when editing this file in nano, it works fine.

When editing this file in kate (which is what I prefer) I get an error: “Could not rename partial file.” It seems that when saving a file, kate will create a .part file with the new contents, and then move that file to replace the original file. However this causes an error because the remote server cannot replace the file, because it is mounted there by docker.

How do I make kate overwrite the file in place?

For now, I can avoid this problem by reconfiguring my server to mount directories instead of files to the involved containers. But this is not always possible as the containers sometimes expect the files to be in specific locations.