### 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
theme_edit_dialog->popup_centered(Size2(850, 700) * EDSCALE);
}
void ThemeEditor::_add_preview_button_cbk() {
	preview_scene_dialog->popup_file_dialog();
}
void ThemeEditor::_preview_scene_dialog_cbk(const String &p_path) {
	SceneThemeEditorPreview *preview_tab = memnew(SceneThemeEditorPreview);
	if (!preview_tab->set_preview_scene(p_path)) {
		return;
	}
	_add_preview_tab(preview_tab, p_path.get_file(), get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")));
	preview_tab->connect("scene_invalidated", callable_mp(this, &ThemeEditor::_remove_preview_tab_invalid).bind(preview_tab));
	preview_tab->connect("scene_reloaded", callable_mp(this, &ThemeEditor::_update_preview_tab).bind(preview_tab));
}
void ThemeEditor::_add_preview_tab(ThemeEditorPreview *p_preview_tab, const String &p_preview_name, const Ref<Texture2D> &p_icon) {
	p_preview_tab->set_preview_theme(theme);
	preview_tabs->add_tab(p_preview_name, p_icon);
	preview_tabs_content->add_child(p_preview_tab);
	preview_tabs->set_tab_button_icon(preview_tabs->get_tab_count() - 1, EditorNode::get_singleton()->get_gui_base()->get_theme_icon(SNAME("close"), SNAME("TabBar")));
	p_preview_tab->connect("control_picked", callable_mp(this, &ThemeEditor::_preview_control_picked));
	preview_tabs->set_current_tab(preview_tabs->get_tab_count() - 1);
}
void ThemeEditor::_change_preview_tab(int p_tab) {