### 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
vbc->set_custom_minimum_size(Size2(240, 260) * EDSCALE);
	btn_group = memnew(VBoxContainer);
	vbc->add_child(btn_group);
	btn_group->set_h_size_flags(SIZE_EXPAND_FILL);
	button_group.instantiate();
	for (int i = 0; i < texture_node_types.size(); i++) {
		CheckBox *check = memnew(CheckBox);
		btn_group->add_child(check);
		check->set_text(texture_node_types[i]);
		check->connect("button_down", callable_mp(this, &CanvasItemEditorViewport::_on_select_type).bind(check));
		check->set_button_group(button_group);
	}
	label = memnew(Label);
	label->add_theme_color_override("font_shadow_color", Color(0, 0, 0, 1));
	label->add_theme_constant_override("shadow_outline_size", 1 * EDSCALE);
	label->hide();
	canvas_item_editor->get_controls_container()->add_child(label);
	label_desc = memnew(Label);
	label_desc->add_theme_color_override("font_color", Color(0.6f, 0.6f, 0.6f, 1));
	label_desc->add_theme_color_override("font_shadow_color", Color(0.2f, 0.2f, 0.2f, 1));
	label_desc->add_theme_constant_override("shadow_outline_size", 1 * EDSCALE);
	label_desc->add_theme_constant_override("line_spacing", 0);
	label_desc->hide();
	canvas_item_editor->get_controls_container()->add_child(label_desc);
	RS::get_singleton()->canvas_set_disable_scale(true);
}
CanvasItemEditorViewport::~CanvasItemEditorViewport() {
	memdelete(preview_node);
}