### Godot version

4.1 beta2

### System information

Windows 10 Home

### Issue description

I had a control with a custom theme which i removed. When loading the project again the Theme Editor is opened and some actions, like Show Default or Override All, cause the editor to crash.

### Steps to reproduce

1. create a scene with a Control node
2. add a custom theme to it
3. click the theme so the Theme Editor opens
4. remove the theme
5. save the scene
6. close the project and open it again (Theme Editor needs to be opened when closing the project)
7. click Show Default or Override All

### Minimal reproduction project

[Godot41_themeEditorCrash.zip](https://github.com/godotengine/godot/files/11760454/Godot41_themeEditorCrash.zip)

void push_item(Object *p_object, const String &p_property = "", bool p_inspector_only = false);
	void edit_item(Object *p_object, Object *p_editing_owner);
	void push_node_item(Node *p_node);
	void hide_unused_editors(const Object *p_editing_owner = nullptr);
	void select_editor_by_name(const String &p_name);
	void open_request(const String &p_path);
	void edit_foreign_resource(Ref<Resource> p_resource);
	bool is_resource_read_only(Ref<Resource> p_resource, bool p_foreign_resources_are_writable = false);
	bool is_changing_scene() const;
	VBoxContainer *get_main_screen_control();
	SubViewport *get_scene_root() { return scene_root; } 
	void set_edited_scene(Node *p_scene);
	Node *get_edited_scene() { return editor_data.get_edited_scene_root(); }
	void fix_dependencies(const String &p_for_file);
	int new_scene();
	Error load_scene(const String &p_scene, bool p_ignore_broken_deps = false, bool p_set_inherited = false, bool p_clear_errors = true, bool p_force_open_imported = false, bool p_silent_change_tab = false);
	Error load_resource(const String &p_resource, bool p_ignore_broken_deps = false);
	HashMap<StringName, Variant> get_modified_properties_for_node(Node *p_node);
	struct AdditiveNodeEntry {
		Node *node = nullptr;
		NodePath parent = NodePath();
		Node *owner = nullptr;
		int index = 0;
		
		Transform2D transform_2d;
		Transform3D transform_3d;