### 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
Variant value = leading_stylebox.stylebox->get(E.name);
		Variant ref_value = leading_stylebox.ref_stylebox->get(E.name);
		if (value == ref_value) {
			continue;
		}
		for (const Ref<StyleBox> &F : styleboxes) {
			Ref<StyleBox> sb = F;
			sb->set(E.name, value);
		}
	}
	leading_stylebox.ref_stylebox = leading_stylebox.stylebox->duplicate();
	
	edited_theme->_unfreeze_and_propagate_changes();
}
void ThemeTypeEditor::_type_variation_changed(const String p_value) {
	EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
	ur->create_action(TTR("Set Theme Type Variation"));
	if (p_value.is_empty()) {
		ur->add_do_method(*edited_theme, "clear_type_variation", edited_type);
	} else {
		ur->add_do_method(*edited_theme, "set_type_variation", edited_type, StringName(p_value));
	}
	if (edited_theme->get_type_variation_base(edited_type) == "") {
		ur->add_undo_method(*edited_theme, "clear_type_variation", edited_type);
	} else {
		ur->add_undo_method(*edited_theme, "set_type_variation", edited_type, edited_theme->get_type_variation_base(edited_type));
	}
	ur->commit_action();
}
void ThemeTypeEditor::_add_type_variation_cbk() {