### 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 (nodes_to_move.is_empty()) {
				return;
			}
			EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
			undo_redo->create_action(TTR("Move Node(s) to Position"));
			for (Node *node : nodes_to_move) {
				CanvasItem *ci = Object::cast_to<CanvasItem>(node);
				if (ci) {
					Transform2D xform = ci->get_global_transform_with_canvas().affine_inverse() * ci->get_transform();
					undo_redo->add_do_method(ci, "_edit_set_position", xform.xform(node_create_position));
					undo_redo->add_undo_method(ci, "_edit_set_position", ci->_edit_get_position());
				}
			}
			undo_redo->commit_action();
			_reset_create_position();
		} break;
	}
}
void CanvasItemEditor::_node_created(Node *p_node) {
	if (node_create_position == Point2()) {
		return;
	}
	CanvasItem *c = Object::cast_to<CanvasItem>(p_node);
	if (c) {
		Transform2D xform = c->get_global_transform_with_canvas().affine_inverse() * c->get_transform();
		c->_edit_set_position(xform.xform(node_create_position));
	}
	call_deferred(SNAME("_reset_create_position")); 
}
void CanvasItemEditor::_reset_create_position() {