### Godot version

4.0.3 stable

### System information

Windows 11

### Issue description

When a main screen plugin contains a viewport, the editor crashes on load.

### Steps to reproduce

(See attached repro project below)

1. Launch the project
2. In project settings, turn on the plugin
3. Close the project
4. Open the project
5. Observe that the editor crashes on load

### Minimal reproduction project

[main_screen_viewport.zip](https://github.com/godotengine/godot/files/11605004/main_screen_viewport.zip)

I uploaded a project where the plugin is turned off so you can look at the project without having to open any script editor to remove the plugin from the enabled list.
limit[SIDE_LEFT] = -10000000;
	limit[SIDE_TOP] = -10000000;
	limit[SIDE_RIGHT] = 10000000;
	limit[SIDE_BOTTOM] = 10000000;
	drag_margin[SIDE_LEFT] = 0.2;
	drag_margin[SIDE_TOP] = 0.2;
	drag_margin[SIDE_RIGHT] = 0.2;
	drag_margin[SIDE_BOTTOM] = 0.2;
	set_notify_transform(true);
	set_hide_clip_children(true);
}