### Godot version

4.0.stable

### System information

Windows 10

### Issue description

In my project, we are rendering a GUI to a QuadMesh as an in-game interactive display. We push mouse click events when the player clicks the display. This worked fine during 4.0 beta, but after moving to the stable release the buttons on TreeItems stopped working. I put together a MRP and went back through the versions and it seems the issue started in RC1.

### Steps to reproduce

When running the MRP, it has a standard GUI on the left hand side of the screen and a QuadMesh rendered GUI on the right hand side. If you click the + button on an item, it will add another item to the list. On the QuadMesh you will see that you can highlight and collapse items in the list, but the + button does not function. If you run the MRP on 4.0.beta17 everything will function as expected.

### Minimal reproduction project

[TreeUI_through_SubViewport.zip](https://github.com/godotengine/godot/files/10959159/TreeUI_through_SubViewport.zip)

void push_text_input(const String &p_text);
	void push_input(const Ref<InputEvent> &p_event, bool p_local_coords = false);
#ifndef DISABLE_DEPRECATED
	void push_unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coords = false);
#endif 
	void set_disable_input(bool p_disable);
	bool is_input_disabled() const;
	Vector2 get_mouse_position() const;
	void warp_mouse(const Vector2 &p_position);
	virtual void update_mouse_cursor_state();
	void set_physics_object_picking(bool p_enable);
	bool get_physics_object_picking();
	void set_physics_object_picking_sort(bool p_enable);
	bool get_physics_object_picking_sort();
	Variant gui_get_drag_data() const;
	void gui_reset_canvas_sort_index();
	int gui_get_canvas_sort_index();
	void gui_release_focus();
	Control *gui_get_focus_owner() const;
	PackedStringArray get_configuration_warnings() const override;
	void set_debug_draw(DebugDraw p_debug_draw);
	DebugDraw get_debug_draw() const;
	int get_render_info(RenderInfoType p_type, RenderInfo p_info);
	void set_snap_controls_to_pixels(bool p_enable);
	bool is_snap_controls_to_pixels_enabled() const;
	void set_snap_2d_transforms_to_pixel(bool p_enable);
	bool is_snap_2d_transforms_to_pixel_enabled() const;
	void set_snap_2d_vertices_to_pixel(bool p_enable);
	bool is_snap_2d_vertices_to_pixel_enabled() const;
	void set_input_as_handled();