### Godot version

Godot 4 beta 12

### System information

Windows 10

### Issue description

![tttttt](https://user-images.githubusercontent.com/43501741/212407759-2e3cfa93-c9c1-4224-a118-2d236b0c5318.png)


### Steps to reproduce

Run a project in Godot 4 beta 12

### Minimal reproduction project

N/A
if (get_editor_data().get_edited_scene_root()) {
		if (get_editor_data().get_edited_scene_root()->get_parent() == scene_root) {
			scene_root->remove_child(get_editor_data().get_edited_scene_root());
		}
	}
	get_editor_data().set_edited_scene_root(p_scene);
	if (Object::cast_to<Popup>(p_scene)) {
		Object::cast_to<Popup>(p_scene)->show();
	}
	SceneTreeDock::get_singleton()->set_edited_scene(p_scene);
	if (get_tree()) {
		get_tree()->set_edited_scene_root(p_scene);
	}
	if (p_scene) {
		if (p_scene->get_parent() != scene_root) {
			scene_root->add_child(p_scene, true);
		}
	}
}
int EditorNode::_get_current_main_editor() {
	for (int i = 0; i < editor_table.size(); i++) {
		if (editor_table[i] == editor_plugin_screen) {
			return i;
		}
	}
	return 0;
}
Dictionary EditorNode::_get_main_scene_state() {