### 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 request_attention();
	void move_to_foreground();
	void set_visible(bool p_visible);
	bool is_visible() const;
	void update_mouse_cursor_state() override;
	void show();
	void hide();
	void set_transient(bool p_transient);
	bool is_transient() const;
	void set_exclusive(bool p_exclusive);
	bool is_exclusive() const;
	void set_clamp_to_embedder(bool p_enable);
	bool is_clamped_to_embedder() const;
	void set_unparent_when_invisible(bool p_unparent);
	bool is_in_edited_scene_root() const;
	bool can_draw() const;
	void set_ime_active(bool p_active);
	void set_ime_position(const Point2i &p_pos);
	bool is_embedded() const;
	Viewport *get_embedder() const;
	void set_content_scale_size(const Size2i &p_size);
	Size2i get_content_scale_size() const;
	void set_content_scale_mode(ContentScaleMode p_mode);
	ContentScaleMode get_content_scale_mode() const;
	void set_content_scale_aspect(ContentScaleAspect p_aspect);
	ContentScaleAspect get_content_scale_aspect() const;
	void set_content_scale_factor(real_t p_factor);
	real_t get_content_scale_factor() const;
	void set_use_font_oversampling(bool p_oversampling);
	bool is_using_font_oversampling() const;