### 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
undo_redo->add_do_property(child, "texture_normal", texture);
	} else {
		undo_redo->add_do_property(child, "texture", texture);
	}
	// make visible for certain node type
	if (Object::cast_to<Control>(child)) {
		Size2 texture_size = texture->get_size();
		undo_redo->add_do_property(child, "size", texture_size);
	} else if (Object::cast_to<Polygon2D>(child)) {
		Size2 texture_size = texture->get_size();
		Vector<Vector2> list = {
			Vector2(0, 0),
			Vector2(texture_size.width, 0),
			Vector2(texture_size.width, texture_size.height),
			Vector2(0, texture_size.height)
		};
		undo_redo->add_do_property(child, "polygon", list);
	}
	// Compute the global position
	Transform2D xform = canvas_item_editor->get_canvas_transform();
	Point2 target_position = xform.affine_inverse().xform(p_point);
	// Adjust position for Control and TouchScreenButton
	if (Object::cast_to<Control>(child) || Object::cast_to<TouchScreenButton>(child)) {
		target_position -= texture->get_size() / 2;
	}
	// there's nothing to be used as source position so snapping will work as absolute if enabled
	target_position = canvas_item_editor->snap_point(target_position);
	undo_redo->add_do_method(child, "set_global_position", target_position);
}
bool CanvasItemEditorViewport::_create_instance(Node *parent, String &path, const Point2 &p_point) {