### 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
DependencyEditor *dependency_fixer = nullptr;
	OrphanResourcesDialog *orphan_resources = nullptr;
	ConfirmationDialog *open_imported = nullptr;
	Button *new_inherited_button = nullptr;
	String open_import_request;
	Vector<WindowWrapper *> floating_docks;
	Button *dock_float = nullptr;
	Button *dock_tab_move_left = nullptr;
	Button *dock_tab_move_right = nullptr;
	Control *dock_select = nullptr;
	PopupPanel *dock_select_popup = nullptr;
	Rect2 dock_select_rect[DOCK_SLOT_MAX];
	TabContainer *dock_slot[DOCK_SLOT_MAX];
	Timer *editor_layout_save_delay_timer = nullptr;
	bool docks_visible = true;
	int dock_popup_selected_idx = -1;
	int dock_select_rect_over_idx = -1;
	PanelContainer *tabbar_panel = nullptr;
	HBoxContainer *tabbar_container = nullptr;
	Button *distraction_free = nullptr;
	Button *scene_tab_add = nullptr;
	Control *scene_tab_add_ph = nullptr;
	Vector<BottomPanelItem> bottom_panel_items;
	PanelContainer *bottom_panel = nullptr;
	HBoxContainer *bottom_panel_hb = nullptr;
	HBoxContainer *bottom_panel_hb_editors = nullptr;
	VBoxContainer *bottom_panel_vb = nullptr;
	EditorToaster *editor_toaster = nullptr;
	LinkButton *version_btn = nullptr;
	Button *bottom_panel_raise = nullptr;