### 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_node_menu->reset_size();
			add_node_menu->set_position(viewport->get_screen_transform().xform(b->get_position()));
			add_node_menu->popup();
			node_create_position = transform.affine_inverse().xform(b->get_position());
			return true;
		}
		if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && b->is_pressed() && tool == TOOL_SELECT && !panner->is_panning()) {
			
			Point2 click = transform.affine_inverse().xform(b->get_position());
			Node *scene = EditorNode::get_singleton()->get_edited_scene();
			if (!scene) {
				return true;
			}
			
			CanvasItem *ci = nullptr;
			Vector<_SelectResult> selection = Vector<_SelectResult>();
			
			_get_canvas_items_at_pos(click, selection);
			if (!selection.is_empty()) {
				ci = selection[0].item;
			}
			if (!ci) {
				
				if (!b->is_shift_pressed()) {
					
					editor_selection->clear();
					viewport->queue_redraw();
					selected_from_canvas = true;