### 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
zoom = 1.0 / MAX(1, EDSCALE);
	view_offset = Point2(-150 - RULER_WIDTH, -95 - RULER_WIDTH);
	previous_update_view_offset = view_offset; // Moves the view a little bit to the left so that (0,0) is visible. The values a relative to a 16/10 screen
	snap_target[0] = SNAP_TARGET_NONE;
	snap_target[1] = SNAP_TARGET_NONE;
	editor_selection = EditorNode::get_singleton()->get_editor_selection();
	editor_selection->add_editor_plugin(this);
	editor_selection->connect("selection_changed", callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw));
	editor_selection->connect("selection_changed", callable_mp(this, &CanvasItemEditor::_selection_changed));
	SceneTreeDock::get_singleton()->connect("node_created", callable_mp(this, &CanvasItemEditor::_node_created));
	SceneTreeDock::get_singleton()->connect("add_node_used", callable_mp(this, &CanvasItemEditor::_reset_create_position));
	EditorNode::get_singleton()->call_deferred(SNAME("connect"), "play_pressed", callable_mp(this, &CanvasItemEditor::_update_override_camera_button).bind(true));
	EditorNode::get_singleton()->call_deferred(SNAME("connect"), "stop_pressed", callable_mp(this, &CanvasItemEditor::_update_override_camera_button).bind(false));
	// A fluid container for all toolbars.
	HFlowContainer *main_flow = memnew(HFlowContainer);
	add_child(main_flow);
	// Main toolbars.
	HBoxContainer *main_menu_hbox = memnew(HBoxContainer);
	main_menu_hbox->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
	main_flow->add_child(main_menu_hbox);
	bottom_split = memnew(VSplitContainer);
	add_child(bottom_split);
	bottom_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
	left_panel_split = memnew(HSplitContainer);
	bottom_split->add_child(left_panel_split);
	left_panel_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);
	right_panel_split = memnew(HSplitContainer);
	left_panel_split->add_child(right_panel_split);
	right_panel_split->set_v_size_flags(Control::SIZE_EXPAND_FILL);