### 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
debug_menu->add_check_shortcut(ED_SHORTCUT("editor/keep_server_open", TTR("Keep Debug Server Open")), SERVER_KEEP_OPEN);
	debug_menu->set_item_tooltip(-1,
			TTR("When this option is enabled, the editor debug server will stay open and listen for new sessions started outside of the editor itself."));
	
	instances_menu = memnew(PopupMenu);
	instances_menu->set_name("run_instances");
	instances_menu->set_hide_on_checkable_item_selection(false);
	debug_menu->add_child(instances_menu);
	debug_menu->add_separator();
	debug_menu->add_submenu_item(TTR("Run Multiple Instances"), "run_instances");
	for (int i = 1; i <= 4; i++) {
		instances_menu->add_radio_check_item(vformat(TTRN("Run %d Instance", "Run %d Instances", i), i));
		instances_menu->set_item_metadata(i - 1, i);
	}
	instances_menu->set_item_checked(0, true);
	instances_menu->connect("index_pressed", callable_mp(this, &DebuggerEditorPlugin::_select_run_count));
	debug_menu->connect("id_pressed", callable_mp(this, &DebuggerEditorPlugin::_menu_option));
}
DebuggerEditorPlugin::~DebuggerEditorPlugin() {
	EditorDebuggerServer::deinitialize();
	memdelete(file_server);
}
void DebuggerEditorPlugin::_select_run_count(int p_index) {
	int len = instances_menu->get_item_count();
	for (int idx = 0; idx < len; idx++) {
		instances_menu->set_item_checked(idx, idx == p_index);
	}
	EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_instances", instances_menu->get_item_metadata(p_index));
}
void DebuggerEditorPlugin::_menu_option(int p_option) {