### 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
real_t centered = -(size.y / 2) / zoom + screen_rect.y / 2;
		if (constrain_editor_view && ABS(centered - previous_update_view_offset.y) < ABS(centered - view_offset.y)) {
			view_offset.y = previous_update_view_offset.y;
		}
		v_scroll->hide();
	} else {
		if (constrain_editor_view && view_offset.y > end.y && view_offset.y > previous_update_view_offset.y) {
			view_offset.y = MAX(end.y, previous_update_view_offset.y);
		}
		if (constrain_editor_view && view_offset.y < begin.y && view_offset.y < previous_update_view_offset.y) {
			view_offset.y = MIN(begin.y, previous_update_view_offset.y);
		}
		v_scroll->show();
		v_scroll->set_min(MIN(view_offset.y, begin.y));
		v_scroll->set_max(MAX(view_offset.y, end.y) + screen_rect.y);
		v_scroll->set_page(screen_rect.y);
	}
	if (canvas_item_rect.size.width <= (local_rect.size.x / zoom)) {
		real_t centered = -(size.x / 2) / zoom + screen_rect.x / 2;
		if (constrain_editor_view && ABS(centered - previous_update_view_offset.x) < ABS(centered - view_offset.x)) {
			view_offset.x = previous_update_view_offset.x;
		}
		h_scroll->hide();
	} else {
		if (constrain_editor_view && view_offset.x > end.x && view_offset.x > previous_update_view_offset.x) {
			view_offset.x = MAX(end.x, previous_update_view_offset.x);
		}
		if (constrain_editor_view && view_offset.x < begin.x && view_offset.x < previous_update_view_offset.x) {
			view_offset.x = MIN(begin.x, previous_update_view_offset.x);
		}