### 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
case Theme::DATA_TYPE_ICON: {
			ur->add_do_method(*edited_theme, "rename_icon", p_item_name, new_name, edited_type);
			ur->add_undo_method(*edited_theme, "rename_icon", new_name, p_item_name, edited_type);
		} break;
		case Theme::DATA_TYPE_STYLEBOX: {
			ur->add_do_method(*edited_theme, "rename_stylebox", p_item_name, new_name, edited_type);
			ur->add_undo_method(*edited_theme, "rename_stylebox", new_name, p_item_name, edited_type);
			if (leading_stylebox.pinned && leading_stylebox.item_name == p_item_name) {
				leading_stylebox.item_name = new_name;
			}
		} break;
	}
	ur->commit_action();
}
void ThemeTypeEditor::_item_rename_entered(String p_value, int p_data_type, String p_item_name, Control *p_control) {
	_item_rename_confirmed(p_data_type, p_item_name, p_control);
}
void ThemeTypeEditor::_item_rename_canceled(int p_data_type, String p_item_name, Control *p_control) {
	
	Object::cast_to<LineEdit>(p_control->get_child(1))->hide();
	
	Object::cast_to<Button>(p_control->get_child(4))->hide();
	Object::cast_to<Button>(p_control->get_child(5))->hide();
	
	Object::cast_to<Label>(p_control->get_child(0))->show();
	
	Object::cast_to<Button>(p_control->get_child(2))->show();
	Object::cast_to<Button>(p_control->get_child(3))->show();
}
void ThemeTypeEditor::_color_item_changed(Color p_value, String p_item_name) {