### 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
tree->clear();
	tree_update_id++;
	updating_tree = true;
	TreeItem *root = tree->create_item();
	
	TreeItem *favorites_item = tree->create_item(root);
	favorites_item->set_icon(0, get_theme_icon(SNAME("Favorites"), SNAME("EditorIcons")));
	favorites_item->set_text(0, TTR("Favorites:"));
	favorites_item->set_metadata(0, "Favorites");
	favorites_item->set_collapsed(p_uncollapsed_paths.find("Favorites") < 0);
	Vector<String> favorite_paths = EditorSettings::get_singleton()->get_favorites();
	Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
	bool fav_changed = false;
	for (int i = favorite_paths.size() - 1; i >= 0; i--) {
		if (da->dir_exists(favorite_paths[i]) || da->file_exists(favorite_paths[i])) {
			continue;
		}
		favorite_paths.remove_at(i);
		fav_changed = true;
	}
	if (fav_changed) {
		EditorSettings::get_singleton()->set_favorites(favorite_paths);
	}
	for (int i = 0; i < favorite_paths.size(); i++) {
		String favorite = favorite_paths[i];
		if (!favorite.begins_with("res://")) {