### 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
String default_type = p_type_name;
		if (edited_theme->get_type_variation_base(p_type_name) != StringName()) {
			default_type = edited_theme->get_type_variation_base(p_type_name);
		}
		(ThemeDB::get_singleton()->get_default_theme().operator->()->*get_list_func)(default_type, &names);
		names.sort_custom<StringName::AlphCompare>();
		for (const StringName &E : names) {
			items[E] = false;
		}
	}
	{
		names.clear();
		(edited_theme.operator->()->*get_list_func)(p_type_name, &names);
		names.sort_custom<StringName::AlphCompare>();
		for (const StringName &E : names) {
			items[E] = true;
		}
	}
	List<StringName> keys;
	for (const KeyValue<StringName, bool> &E : items) {
		keys.push_back(E.key);
	}
	keys.sort_custom<StringName::AlphCompare>();
	HashMap<StringName, bool> ordered_items;
	for (const StringName &E : keys) {
		ordered_items[E] = items[E];
	}
	return ordered_items;
}
HBoxContainer *ThemeTypeEditor::_create_property_control(Theme::DataType p_data_type, String p_item_name, bool p_editable) {