### 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
type_variation_vb->add_child(type_variation_hb);
	Label *type_variation_label = memnew(Label);
	type_variation_hb->add_child(type_variation_label);
	type_variation_label->set_text(TTR("Base Type"));
	type_variation_label->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	type_variation_edit = memnew(LineEdit);
	type_variation_hb->add_child(type_variation_edit);
	type_variation_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
	type_variation_edit->connect("text_changed", callable_mp(this, &ThemeTypeEditor::_type_variation_changed));
	type_variation_edit->connect("focus_exited", callable_mp(this, &ThemeTypeEditor::_update_type_items));
	type_variation_button = memnew(Button);
	type_variation_hb->add_child(type_variation_button);
	type_variation_button->set_tooltip_text(TTR("Select the variation base type from a list of available types."));
	type_variation_button->connect("pressed", callable_mp(this, &ThemeTypeEditor::_add_type_variation_cbk));
	type_variation_locked = memnew(Label);
	type_variation_vb->add_child(type_variation_locked);
	type_variation_locked->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
	type_variation_locked->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
	type_variation_locked->set_text(TTR("A type associated with a built-in class cannot be marked as a variation of another type."));
	type_variation_locked->hide();
	add_type_dialog = memnew(ThemeTypeDialog);
	add_child(add_type_dialog);
	add_type_dialog->connect("type_selected", callable_mp(this, &ThemeTypeEditor::_add_type_dialog_selected));
	update_debounce_timer = memnew(Timer);
	update_debounce_timer->set_one_shot(true);
	update_debounce_timer->set_wait_time(0.5);
	update_debounce_timer->connect("timeout", callable_mp(this, &ThemeTypeEditor::_update_type_list));
	add_child(update_debounce_timer);
}
void ThemeEditor::edit(const Ref<Theme> &p_theme) {