### 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 _gui_remove_focus_for_window(Node *p_window);
	void _gui_unfocus_control(Control *p_control);
	bool _gui_control_has_focus(const Control *p_control);
	void _gui_control_grab_focus(Control *p_control);
	void _gui_grab_click_focus(Control *p_control);
	void _post_gui_grab_click_focus();
	void _gui_accept_event();
	bool _gui_drop(Control *p_at_control, Point2 p_at_pos, bool p_just_check);
	friend class AudioListener2D;
	void _audio_listener_2d_set(AudioListener2D *p_listener);
	void _audio_listener_2d_remove(AudioListener2D *p_listener);
	friend class Camera2D;
	void _camera_2d_set(Camera2D *p_camera_2d);
	friend class CanvasLayer;
	void _canvas_layer_add(CanvasLayer *p_canvas_layer);
	void _canvas_layer_remove(CanvasLayer *p_canvas_layer);
	void _drop_mouse_over();
	void _drop_mouse_focus();
	void _drop_physics_mouseover(bool p_paused_only = false);
	void _update_canvas_items(Node *p_node);
	friend class Window;
	void _sub_window_update_order();
	void _sub_window_register(Window *p_window);
	void _sub_window_update(Window *p_window);
	void _sub_window_grab_focus(Window *p_window);
	void _sub_window_remove(Window *p_window);
	int _sub_window_find(Window *p_window);
	bool _sub_windows_forward_input(const Ref<InputEvent> &p_event);
	SubWindowResize _sub_window_get_resize_margin(Window *p_subwindow, const Point2 &p_point);
	virtual bool _can_consume_input_events() const { return true; }