### Godot version

v4.2.dev4.mono.official [549fcce5f]

### System information

window10 64bit

### Issue description

![GIF 2023-9-1 22-39-07](https://github.com/godotengine/godot/assets/35988767/d7be4a45-f5f0-4408-8758-f4bf9f3c9c5d)


### Steps to reproduce

/

### Minimal reproduction project

/
Error change_dir_result = dir_access->change_dir(favorites->get_item_metadata(p_idx));
	if (change_dir_result != OK) {
		error_dialog->set_text(TTR("Favorited folder does not exist anymore and will be removed."));
		error_dialog->popup_centered(Size2(250, 50) * EDSCALE);
		bool res = (access == ACCESS_RESOURCES);
		Vector<String> favorited = EditorSettings::get_singleton()->get_favorites();
		String dir_to_remove = favorites->get_item_metadata(p_idx);
		bool found = false;
		for (int i = 0; i < favorited.size(); i++) {
			bool cres = favorited[i].begins_with("res://");
			if (cres != res) {
				continue;
			}
			if (favorited[i] == dir_to_remove) {
				found = true;
				break;
			}
		}
		if (found) {
			favorited.erase(favorites->get_item_metadata(p_idx));
			favorites->remove_item(p_idx);
			EditorSettings::get_singleton()->set_favorites(favorited);
		}
	} else {
		update_dir();
		invalidate();
		_push_history();
	}
}
void EditorFileDialog::_favorite_move_up() {