### Tested versions

Godot Engine v4.2.stable.official.46dc27791

### System information

Windows 10

### Issue description

When exporting to web, Godot fails with this error in the console:

> scene/main/window.cpp:884 - Attempting to make child window exclusive, but the parent window already has another exclusive child. This window: /root/@<!-- -->EditorNode@<!-- -->17120/@<!-- -->Panel@<!-- -->13/@<!-- -->ProjectExportDialog@<!-- -->559/@<!-- -->VBoxContainer@<!-- -->137/@<!-- -->AcceptDialog@<!-- -->411, parent window: /root/@<!-- -->EditorNode@<!-- -->17120/@<!-- -->Panel@<!-- -->13/@<!-- -->ProjectExportDialog@<!-- -->559, current exclusive child window: /root/@<!-- -->EditorNode@<!-- -->17120/@<!-- -->Panel@<!-- -->13/@<!-- -->ProjectExportDialog@<!-- -->559/@<!-- -->ProgressDialog@<!-- -->17444

![a](https://github.com/godotengine/godot/assets/2000051/bf9d22aa-d3fe-4e11-bff6-c387e740fe90)

This happens for newly created empty projects.


### Steps to reproduce

1. Open the attached project (or create a new project).
2. Project->Export->Export All
3. Observe the console error.  No output files are generated.


### Minimal reproduction project (MRP)

[export_test.zip](https://github.com/godotengine/godot/files/13574810/export_test.zip)

String orientations;
			const DisplayServer::ScreenOrientation screen_orientation =
					DisplayServer::ScreenOrientation(int(GLOBAL_GET("display/window/handheld/orientation")));
			switch (screen_orientation) {
				case DisplayServer::SCREEN_LANDSCAPE:
					orientations += "<string>UIInterfaceOrientationLandscapeLeft</string>\n";
					break;
				case DisplayServer::SCREEN_PORTRAIT:
					orientations += "<string>UIInterfaceOrientationPortrait</string>\n";
					break;
				case DisplayServer::SCREEN_REVERSE_LANDSCAPE:
					orientations += "<string>UIInterfaceOrientationLandscapeRight</string>\n";
					break;
				case DisplayServer::SCREEN_REVERSE_PORTRAIT:
					orientations += "<string>UIInterfaceOrientationPortraitUpsideDown</string>\n";
					break;
				case DisplayServer::SCREEN_SENSOR_LANDSCAPE:
					
					orientations += "<string>UIInterfaceOrientationLandscapeLeft</string>\n";
					orientations += "<string>UIInterfaceOrientationLandscapeRight</string>\n";
					break;
				case DisplayServer::SCREEN_SENSOR_PORTRAIT:
					
					orientations += "<string>UIInterfaceOrientationPortrait</string>\n";
					orientations += "<string>UIInterfaceOrientationPortraitUpsideDown</string>\n";
					break;
				case DisplayServer::SCREEN_SENSOR:
					
					orientations += "<string>UIInterfaceOrientationLandscapeLeft</string>\n";
					orientations += "<string>UIInterfaceOrientationLandscapeRight</string>\n";