Repository: godotengine/godot (language: cpp)

Issue:
Unable to select items in SubViewport with size 2D override
### Tested versions

- v4.3.stable.official [77dcf97d8]
- v4.4.beta2.official [a013481b0]

### System information

Godot v4.4.dev (1fa1f5c75) - macOS Sequoia (15.3.0) - Multi-window, 2 monitors - Metal (Forward+) - integrated Apple M4 Max (Apple9) - Apple M4 Max (16 threads)

### Issue description

Unable to click nodes inside a `SubViewport`, in a `SubViewportContainer`, when the SubViewport configures the `size_2d_override` and sets  `size_2d_override_stretch` to true.

### Steps to reproduce

See the MRP

### Minimal reproduction project (MRP)

[mrp.zip](https://github.com/user-attachments/files/18650433/mrp.zip)


Discussion / hints:

Fix patch:
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 4256e74619a4..a58659f29b4f 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -623,7 +623,7 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
 			return;
 		}
 		xform = vp->get_popup_base_transform();
-		if (!vp->get_visible_rect().has_point(xform.xform_inv(p_pos))) {
+		if (!vp->get_visible_rect().has_point(xform.affine_inverse().xform(p_pos))) {
 			return;
 		}
 	}
@@ -726,7 +726,7 @@ void CanvasItemEditor::_find_canvas_items_in_rect(const Rect2 &p_rect, Node *p_n
 			return;
 		}
 		xform = vp->get_popup_base_transform();
-		if (!vp->get_visible_rect().intersects(xform.xform_inv(p_rect))) {
+		if (!vp->get_visible_rect().intersects(xform.affine_inverse().xform(p_rect))) {
 			return;
 		}
 	}


Test patch: