### 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
} else {
			rect = rect.merge(canvas_item_rect);
		}
	}
	if (p_op == VIEW_FRAME_TO_SELECTION && rect.size.x > CMP_EPSILON && rect.size.y > CMP_EPSILON) {
		real_t scale_x = viewport->get_size().x / rect.size.x;
		real_t scale_y = viewport->get_size().y / rect.size.y;
		zoom = scale_x < scale_y ? scale_x : scale_y;
		zoom *= 0.90;
		zoom_widget->set_zoom(zoom);
		viewport->queue_redraw(); // Redraw to update the global canvas transform after zoom changes.
		call_deferred(SNAME("center_at"), rect.get_center()); // Defer because the updated transform is needed.
	} else {
		center_at(rect.get_center());
	}
}
void CanvasItemEditor::_reset_drag() {
	drag_type = DRAG_NONE;
	drag_selection.clear();
}
void CanvasItemEditor::_bind_methods() {
	ClassDB::bind_method("_get_editor_data", &CanvasItemEditor::_get_editor_data);
	ClassDB::bind_method(D_METHOD("set_state"), &CanvasItemEditor::set_state);
	ClassDB::bind_method(D_METHOD("update_viewport"), &CanvasItemEditor::update_viewport);
	ClassDB::bind_method(D_METHOD("center_at", "position"), &CanvasItemEditor::center_at);
	ClassDB::bind_method("_set_owner_for_node_and_children", &CanvasItemEditor::_set_owner_for_node_and_children);
	ADD_SIGNAL(MethodInfo("item_lock_status_changed"));
	ADD_SIGNAL(MethodInfo("item_group_status_changed"));
}
Dictionary CanvasItemEditor::get_state() const {