### Godot version

4.2 eca6f0e

### System information

Windows 10 x64

### Issue description


https://github.com/godotengine/godot/assets/2223172/a2796263-4e2e-4b14-a080-b3ad034cc141



### Steps to reproduce

1. Add SubViewport
2. Add Sprite2D
3. Set spirte's texture to ViewportTexture
4. Create new scene
5. Instance the new scene inside the scene with viewport
6. Make sure both scenes are opened
7. Go to instance scene and save it
8. Go to viewport scene

You will see error spam. Reloading the scene fixes it.

### Minimal reproduction project

[vip.zip](https://github.com/godotengine/godot/files/12292386/vip.zip)

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) const;
	bool _sub_windows_forward_input(const Ref<InputEvent> &p_event);
	SubWindowResize _sub_window_get_resize_margin(Window *p_subwindow, const Point2 &p_point);
	void _update_mouse_over();
	virtual void _update_mouse_over(Vector2 p_pos);
	virtual void _mouse_leave_viewport();
	virtual bool _can_consume_input_events() const { return true; }