### 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
Size2 parent_scale = parent_xform.get_scale();
				scale_factor *= Vector2(1.0 / parent_scale.x, 1.0 / parent_scale.y);
				if (drag_type == DRAG_SCALE_X) {
					scale.x += scale_factor.x;
					if (uniform) {
						scale.y = scale.x * ratio;
					}
				} else if (drag_type == DRAG_SCALE_Y) {
					scale.y -= scale_factor.y;
					if (uniform) {
						scale.x = scale.y / ratio;
					}
				}
			}
			if (snap_scale && !is_ctrl) {
				if (snap_relative) {
					scale.x = original_scale.x * (roundf((scale.x / original_scale.x) / snap_scale_step) * snap_scale_step);
					scale.y = original_scale.y * (roundf((scale.y / original_scale.y) / snap_scale_step) * snap_scale_step);
				} else {
					scale.x = roundf(scale.x / snap_scale_step) * snap_scale_step;
					scale.y = roundf(scale.y / snap_scale_step) * snap_scale_step;
				}
			}
			ci->_edit_set_scale(scale);
			return true;
		}
		
		if (b.is_valid() && b->get_button_index() == MouseButton::LEFT && !b->is_pressed()) {
			if (drag_selection.size() != 1) {
				_commit_canvas_item_state(