### Godot version

4.0 fb10f45

### System information

Windows 10 x64

### Issue description

Behold, empty TileSet editor, with no TileMap node nor bottom button visible:
![image](https://github.com/godotengine/godot/assets/2223172/0f052770-4946-40eb-a790-a995dbe2599c)
Regression from #72277 (most likely, I didn't test)

### Steps to reproduce

1. Add some Node to your scene
2. Add a TileMap as a child
3. Select TileMap
4. Fold its parent in the scene tree
5. Restart the editor
6. The TileMap selection is restored and so is the folded node, resulting in a weird paradox

### Minimal reproduction project

N/A
}
	}
	file->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
	saving_resource = p_resource;
	current_menu_option = RESOURCE_SAVE_AS;
	List<String> extensions;
	Ref<PackedScene> sd = memnew(PackedScene);
	ResourceSaver::get_recognized_extensions(p_resource, &extensions);
	file->clear_filters();
	List<String> preferred;
	for (const String &E : extensions) {
		if (p_resource->is_class("Script") && (E == "tres" || E == "res")) {
			
			continue;
		}
		file->add_filter("*." + E, E.to_upper());
		preferred.push_back(E);
	}
	
	List<String>::Element *res_element = preferred.find("res");
	if (res_element) {
		preferred.move_to_back(res_element);
	}
	
	List<String>::Element *tres_element = preferred.find("tres");
	if (tres_element) {
		preferred.move_to_front(tres_element);
	}
	if (!p_at_path.is_empty()) {
		file->set_current_dir(p_at_path);