### Godot version

4.1 dev3

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

Trying to move a folder results in moving error and it's not moved.
Regression from #75330

A fix already exists, but I'm opening an issue so it's not lost (the PR isn't ready and not very active).

### Steps to reproduce

1. Add 2 folders in filesystem
2. Move one folder into another one

### Minimal reproduction project

N/A
}
		bool is_moved = false;
		HashMap<String, String> file_renames;
		HashMap<String, String> folder_renames;
		for (int i = 0; i < to_move.size(); i++) {
			String old_path = to_move[i].path.ends_with("/") ? to_move[i].path.substr(0, to_move[i].path.length() - 1) : to_move[i].path;
			const String &new_path = new_paths[i];
			if (old_path != new_path) {
				_try_move_item(to_move[i], new_path, file_renames, folder_renames);
				is_moved = true;
			}
		}
		if (is_moved) {
			int current_tab = EditorNode::get_singleton()->get_current_tab();
			_save_scenes_after_move(file_renames); 
			_update_dependencies_after_move(file_renames);
			_update_resource_paths_after_move(file_renames);
			_update_project_settings_after_move(file_renames);
			_update_favorites_list_after_move(file_renames, folder_renames);
			EditorNode::get_singleton()->set_current_tab(current_tab);
			print_verbose("FileSystem: calling rescan.");
			_rescan();
			print_verbose("FileSystem: saving moved scenes.");
			_save_scenes_after_move(file_renames);
			current_path = p_to_path;
			current_path_line_edit->set_text(current_path);
		}
	}
}
Vector<String> FileSystemDock::_tree_get_selected(bool remove_self_inclusion) const {