### 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)

bool is_input_handled() const;
	void set_handle_input_locally(bool p_enable);
	bool is_handling_input_locally() const;
	bool gui_is_dragging() const;
	bool gui_is_drag_successful() const;
	Control *gui_find_control(const Point2 &p_global);
	void set_sdf_oversize(SDFOversize p_sdf_oversize);
	SDFOversize get_sdf_oversize() const;
	void set_sdf_scale(SDFScale p_sdf_scale);
	SDFScale get_sdf_scale() const;
	void set_default_canvas_item_texture_filter(DefaultCanvasItemTextureFilter p_filter);
	DefaultCanvasItemTextureFilter get_default_canvas_item_texture_filter() const;
	void set_default_canvas_item_texture_repeat(DefaultCanvasItemTextureRepeat p_repeat);
	DefaultCanvasItemTextureRepeat get_default_canvas_item_texture_repeat() const;
	
	void set_vrs_mode(VRSMode p_vrs_mode);
	VRSMode get_vrs_mode() const;
	void set_vrs_texture(Ref<Texture2D> p_texture);
	Ref<Texture2D> get_vrs_texture() const;
	virtual DisplayServer::WindowID get_window_id() const = 0;
	void set_embedding_subwindows(bool p_embed);
	bool is_embedding_subwindows() const;
	Viewport *get_parent_viewport() const;
	Window *get_base_window() const;
	void pass_mouse_focus_to(Viewport *p_viewport, Control *p_control);
	void set_canvas_cull_mask(uint32_t p_layers);
	uint32_t get_canvas_cull_mask() const;
	void set_canvas_cull_mask_bit(uint32_t p_layer, bool p_enable);
	bool get_canvas_cull_mask_bit(uint32_t p_layer) const;
	virtual bool is_size_2d_override_stretch_enabled() const { return true; }