### 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
}
			path += E;
			animation->add_item(path);
			if (player->get_assigned_animation() == path) {
				active_idx = animation->get_selectable_item(true);
			}
			no_anims_found = false;
		}
	}
#define ITEM_CHECK_DISABLED(m_item) tool_anim->get_popup()->set_item_disabled(tool_anim->get_popup()->get_item_index(m_item), foreign_global_anim_lib)
	ITEM_CHECK_DISABLED(TOOL_NEW_ANIM);
#undef ITEM_CHECK_DISABLED
#define ITEM_CHECK_DISABLED(m_item) tool_anim->get_popup()->set_item_disabled(tool_anim->get_popup()->get_item_index(m_item), no_anims_found || foreign_global_anim_lib)
	ITEM_CHECK_DISABLED(TOOL_DUPLICATE_ANIM);
	ITEM_CHECK_DISABLED(TOOL_RENAME_ANIM);
	ITEM_CHECK_DISABLED(TOOL_EDIT_TRANSITIONS);
	ITEM_CHECK_DISABLED(TOOL_REMOVE_ANIM);
	ITEM_CHECK_DISABLED(TOOL_EDIT_RESOURCE);
#undef ITEM_CHECK_DISABLED
	stop->set_disabled(no_anims_found);
	play->set_disabled(no_anims_found);
	play_bw->set_disabled(no_anims_found);
	play_bw_from->set_disabled(no_anims_found);
	play_from->set_disabled(no_anims_found);
	frame->set_editable(!no_anims_found);
	animation->set_disabled(no_anims_found);
	autoplay->set_disabled(no_anims_found);
	onion_toggle->set_disabled(no_anims_found);
	onion_skinning->set_disabled(no_anims_found);
	if (hack_disable_onion_skinning) {