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

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;
	TypedArray<Window> get_embedded_subwindows() const;
	void subwindow_set_popup_safe_rect(Window *p_window, const Rect2i &p_rect);
	Rect2i subwindow_get_popup_safe_rect(Window *p_window) 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; }