### 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
show_rulers = !show_rulers;
			int idx = view_menu->get_popup()->get_item_index(SHOW_RULERS);
			view_menu->get_popup()->set_item_checked(idx, show_rulers);
			update_viewport();
		} break;
		case SHOW_GUIDES: {
			show_guides = !show_guides;
			int idx = view_menu->get_popup()->get_item_index(SHOW_GUIDES);
			view_menu->get_popup()->set_item_checked(idx, show_guides);
			viewport->queue_redraw();
		} break;
		case LOCK_SELECTED: {
			undo_redo->create_action(TTR("Lock Selected"));
			List<Node *> selection = editor_selection->get_selected_node_list();
			for (Node *E : selection) {
				CanvasItem *ci = Object::cast_to<CanvasItem>(E);
				if (!ci || !ci->is_inside_tree()) {
					continue;
				}
				if (ci->get_viewport() != EditorNode::get_singleton()->get_scene_root()) {
					continue;
				}
				undo_redo->add_do_method(ci, "set_meta", "_edit_lock_", true);
				undo_redo->add_undo_method(ci, "remove_meta", "_edit_lock_");
				undo_redo->add_do_method(this, "emit_signal", "item_lock_status_changed");
				undo_redo->add_undo_method(this, "emit_signal", "item_lock_status_changed");
			}
			undo_redo->add_do_method(viewport, "queue_redraw");
			undo_redo->add_undo_method(viewport, "queue_redraw");
			undo_redo->commit_action();