### 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
if (parent_ci) {
			target_pos = parent_ci->get_global_transform_with_canvas().affine_inverse().xform(target_pos);
		}
		// Preserve instance position of the original scene.
		target_pos += instance_ci->_edit_get_position();
		undo_redo->add_do_method(instantiated_scene, "set_position", target_pos);
	}
	return true;
}
void CanvasItemEditorViewport::_perform_drop_data() {
	_remove_preview();
	// Without root dropping multiple files is not allowed
	if (!target_node && selected_files.size() > 1) {
		accept->set_text(TTR("Cannot instantiate multiple nodes without root."));
		accept->popup_centered();
		return;
	}
	Vector<String> error_files;
	EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
	undo_redo->create_action(TTR("Create Node"));
	for (int i = 0; i < selected_files.size(); i++) {
		String path = selected_files[i];
		Ref<Resource> res = ResourceLoader::load(path);
		if (res.is_null()) {
			continue;
		}
		Ref<PackedScene> scene = Ref<PackedScene>(Object::cast_to<PackedScene>(*res));
		if (scene != nullptr && scene.is_valid()) {
			if (!target_node) {
				// Without root node act the same as "Load Inherited Scene"