### 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
return true;
		}
		
		const Vector2 delta = (pan_speed / zoom) * pan_gesture->get_delta();
		view_offset.x += delta.x;
		view_offset.y += delta.y;
		update_viewport();
		return true;
	}
	return false;
}
void CanvasItemEditor::_scroll_callback(Vector2 p_scroll_vec, bool p_alt) {
	_pan_callback(-p_scroll_vec * pan_speed);
}
void CanvasItemEditor::_pan_callback(Vector2 p_scroll_vec) {
	view_offset.x -= p_scroll_vec.x / zoom;
	view_offset.y -= p_scroll_vec.y / zoom;
	update_viewport();
}
void CanvasItemEditor::_zoom_callback(Vector2 p_scroll_vec, Vector2 p_origin, bool p_alt) {
	int scroll_sign = (int)SIGN(p_scroll_vec.y);
	
	zoom_widget->set_zoom_by_increments(-scroll_sign, p_alt);
	if (!Math::is_equal_approx(ABS(p_scroll_vec.y), (real_t)1.0)) {
		
		zoom_widget->set_zoom(zoom * ((zoom_widget->get_zoom() / zoom - 1.f) * ABS(p_scroll_vec.y) + 1.f));
	}
	_zoom_on_position(zoom_widget->get_zoom(), p_origin);
}
bool CanvasItemEditor::_gui_input_pivot(const Ref<InputEvent> &p_event) {