### Godot version

v4.0.beta.custom_build [eaf306e0b]

### System information

Windows 10

### Issue description

Selecting a `Window` node in the Editor's SceneTree results in the message
```
editor/editor_data.cpp:1058 - Parameter "p_node" is null.
```
and the Inspector shows empty content instead of the Window's properties.

I would expect, that clicking on a node in the SceneTree lets me edit the properties of the node.

Bisecting shows that this behavior got introduced in #71770

### Steps to reproduce

1. Create a Window node
2. Click on the Window node in the Editor's SceneTree

### Minimal reproduction project

N/A
item_control->add_child(pin_leader_button);
				pin_leader_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_on_pin_leader_button_pressed).bind(item_editor, E.key));
			} else {
				if (ThemeDB::get_singleton()->get_default_theme()->has_stylebox(E.key, edited_type)) {
					item_editor->set_edited_resource(ThemeDB::get_singleton()->get_default_theme()->get_stylebox(E.key, edited_type));
				} else {
					item_editor->set_edited_resource(Ref<Resource>());
				}
				item_editor->set_editable(false);
			}
			item_control->add_child(item_editor);
			_add_focusable(item_editor);
			stylebox_items_list->add_child(item_control);
		}
	}
	
	if (edited_type.is_empty() || ClassDB::class_exists(edited_type)) {
		type_variation_edit->set_editable(false);
		type_variation_edit->set_text("");
		type_variation_button->hide();
		type_variation_locked->set_visible(!edited_type.is_empty());
	} else {
		type_variation_edit->set_editable(true);
		type_variation_edit->set_text(edited_theme->get_type_variation_base(edited_type));
		_add_focusable(type_variation_edit);
		type_variation_button->show();
		type_variation_locked->hide();
	}
}
void ThemeTypeEditor::_list_type_selected(int p_index) {