### 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
name_dialog->set_title(TTR("Create New Animation"));
	name_dialog->set_hide_on_ok(false);
	add_child(name_dialog);
	VBoxContainer *vb = memnew(VBoxContainer);
	name_dialog->add_child(vb);
	name_title = memnew(Label(TTR("Animation Name:")));
	vb->add_child(name_title);
	HBoxContainer *name_hb = memnew(HBoxContainer);
	name = memnew(LineEdit);
	name_hb->add_child(name);
	name->set_h_size_flags(SIZE_EXPAND_FILL);
	library = memnew(OptionButton);
	name_hb->add_child(library);
	library->hide();
	vb->add_child(name_hb);
	name_dialog->register_text_enter(name);
	error_dialog = memnew(ConfirmationDialog);
	error_dialog->set_ok_button_text(TTR("Close"));
	error_dialog->set_title(TTR("Error!"));
	add_child(error_dialog);
	name_dialog->connect("confirmed", callable_mp(this, &AnimationPlayerEditor::_animation_name_edited));
	blend_editor.dialog = memnew(AcceptDialog);
	add_child(blend_editor.dialog);
	blend_editor.dialog->set_ok_button_text(TTR("Close"));
	blend_editor.dialog->set_hide_on_ok(true);
	VBoxContainer *blend_vb = memnew(VBoxContainer);
	blend_editor.dialog->add_child(blend_vb);
	blend_editor.tree = memnew(Tree);
	blend_editor.tree->set_columns(2);
	blend_vb->add_margin_child(TTR("Blend Times:"), blend_editor.tree, true);