project: Fix content swap when an LSP rename also renames the file (#59104)