Cursor loses context when editing files via SSH

If using the SSH plugin from Microsoft to edit a file remotely, Cursor regularly loses context and applies changes to a new file instead of the currently open file.