### 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
if (y_handle_rect.has_point(simple_xform.affine_inverse().xform(b->get_position()))) {
							drag_type = DRAG_MOVE_Y;
						}
					}
					drag_from = transform.affine_inverse().xform(b->get_position());
					_save_canvas_item_state(drag_selection);
				}
				return true;
			}
		}
	}
	if (drag_type == DRAG_MOVE || drag_type == DRAG_MOVE_X || drag_type == DRAG_MOVE_Y) {
		
		if (m.is_valid()) {
			_restore_canvas_item_state(drag_selection, true);
			drag_to = transform.affine_inverse().xform(m->get_position());
			Point2 previous_pos;
			if (!drag_selection.is_empty()) {
				if (drag_selection.size() == 1) {
					Transform2D xform = drag_selection[0]->get_global_transform_with_canvas() * drag_selection[0]->get_transform().affine_inverse();
					previous_pos = xform.xform(drag_selection[0]->_edit_get_position());
				} else {
					previous_pos = _get_encompassing_rect_from_list(drag_selection).position;
				}
			}
			Point2 new_pos = snap_point(previous_pos + (drag_to - drag_from), SNAP_GRID | SNAP_GUIDES | SNAP_PIXEL | SNAP_NODE_PARENT | SNAP_NODE_ANCHORS | SNAP_OTHER_NODES, 0, nullptr, drag_selection);
			if (drag_type == DRAG_MOVE_X) {
				new_pos.y = previous_pos.y;
			} else if (drag_type == DRAG_MOVE_Y) {
				new_pos.x = previous_pos.x;