### 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 (drag_type == DRAG_NONE || drag_selection.is_empty() || !drag_selection.front()->get()) {
		return;
	}
	String transform_message;
	Transform2D current_transform = drag_selection.front()->get()->get_global_transform();
	double snap = EDITOR_GET("interface/inspector/default_float_step");
	int snap_step_decimals = Math::range_step_decimals(snap);
#define FORMAT(value) (TS->format_number(String::num(value, snap_step_decimals)))
	switch (drag_type) {
		case DRAG_MOVE:
		case DRAG_MOVE_X:
		case DRAG_MOVE_Y: {
			Vector2 delta = current_transform.get_origin() - original_transform.get_origin();
			if (drag_type == DRAG_MOVE) {
				transform_message = TTR("Moving:") + " (" + FORMAT(delta.x) + ", " + FORMAT(delta.y) + ") px";
			} else if (drag_type == DRAG_MOVE_X) {
				transform_message = TTR("Moving:") + " " + FORMAT(delta.x) + " px";
			} else if (drag_type == DRAG_MOVE_Y) {
				transform_message = TTR("Moving:") + " " + FORMAT(delta.y) + " px";
			}
		} break;
		case DRAG_ROTATE: {
			real_t delta = Math::rad_to_deg(current_transform.get_rotation() - original_transform.get_rotation());