### 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
add_preview_button->set_text(TTR("Add Preview"));
	add_preview_button_hb->add_child(add_preview_button);
	add_preview_button->connect("pressed", callable_mp(this, &ThemeEditor::_add_preview_button_cbk));
	DefaultThemeEditorPreview *default_preview_tab = memnew(DefaultThemeEditorPreview);
	preview_tabs_content->add_child(default_preview_tab);
	default_preview_tab->connect("control_picked", callable_mp(this, &ThemeEditor::_preview_control_picked));
	preview_tabs->add_tab(TTR("Default Preview"));
	preview_scene_dialog = memnew(EditorFileDialog);
	preview_scene_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
	preview_scene_dialog->set_title(TTR("Select UI Scene:"));
	List<String> ext;
	ResourceLoader::get_recognized_extensions_for_type("PackedScene", &ext);
	for (const String &E : ext) {
		preview_scene_dialog->add_filter("*." + E, TTR("Scene"));
	}
	main_hs->add_child(preview_scene_dialog);
	preview_scene_dialog->connect("file_selected", callable_mp(this, &ThemeEditor::_preview_scene_dialog_cbk));
	main_hs->add_child(theme_type_editor);
	theme_type_editor->set_custom_minimum_size(Size2(280, 0) * EDSCALE);
}
void ThemeEditorPlugin::edit(Object *p_node) {
	if (Object::cast_to<Theme>(p_node)) {
		theme_editor->edit(Object::cast_to<Theme>(p_node));
	} else if (Object::cast_to<Font>(p_node) || Object::cast_to<StyleBox>(p_node) || Object::cast_to<Texture2D>(p_node)) {
		
	} else {
		theme_editor->edit(Ref<Theme>());
	}
}
bool ThemeEditorPlugin::handles(Object *p_node) const {