### 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
int new_index = editor_data.get_edited_scene();
	int old_index = new_index;
	if (new_index > 0) {
		new_index = new_index - 1;
	} else if (editor_data.get_edited_scene_count() > 1) {
		new_index = 1;
	} else {
		editor_data.add_edited_scene(-1);
		new_index = 1;
	}
	if (p_change_tab) {
		_scene_tab_changed(new_index);
	}
	editor_data.remove_scene(old_index);
	_update_title();
	_update_scene_tabs();
}
void EditorNode::_remove_scene(int index, bool p_change_tab) {
	
	editor_data.clear_script_icon_cache();
	if (editor_data.get_edited_scene() == index) {
		
		_remove_edited_scene(p_change_tab);
	} else {
		
		editor_data.remove_scene(index);
	}
}
void EditorNode::set_edited_scene(Node *p_scene) {