### 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 (!ci->is_set_as_top_level()) {
			xform *= p_parent_xform;
		}
		xform *= ci->get_transform();
		Rect2 rect = ci->_edit_get_rect();
		if (r_first) {
			r_rect = Rect2(xform.xform(rect.get_center()), Size2());
			r_first = false;
		}
		r_rect.expand_to(xform.xform(rect.position));
		r_rect.expand_to(xform.xform(rect.position + Point2(rect.size.x, 0)));
		r_rect.expand_to(xform.xform(rect.position + Point2(0, rect.size.y)));
		r_rect.expand_to(xform.xform(rect.position + rect.size));
	}
}
Rect2 CanvasItemEditor::_get_encompassing_rect(const Node *p_node) {
	Rect2 rect;
	bool first = true;
	_expand_encompassing_rect_using_children(rect, p_node, first);
	return rect;
}
void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_node, Vector<_SelectResult> &r_items, const Transform2D &p_parent_xform, const Transform2D &p_canvas_xform) {
	if (!p_node) {
		return;
	}
	if (Object::cast_to<Viewport>(p_node)) {
		return;
	}
	const real_t grab_distance = EDITOR_GET("editors/polygon_editor/point_grab_radius");
	CanvasItem *ci = Object::cast_to<CanvasItem>(p_node);