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

int export_angle = p_preset->get("application/export_angle");
	bool include_angle_libs = false;
	if (export_angle == 0) {
		include_angle_libs = String(GLOBAL_GET("rendering/gl_compatibility/driver.windows")) == "opengl3_angle";
	} else if (export_angle == 1) {
		include_angle_libs = true;
	}
	if (include_angle_libs) {
		String custom_debug = p_preset->get("custom_template/debug");
		String custom_release = p_preset->get("custom_template/release");
		String arch = p_preset->get("binary_format/architecture");
		String template_path = p_debug ? custom_debug : custom_release;
		template_path = template_path.strip_edges();
		if (template_path.is_empty()) {
			template_path = find_export_template(get_template_file_name(p_debug ? "debug" : "release", arch));
		}
		Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
		if (da->file_exists(template_path.get_base_dir().path_join("libEGL." + arch + ".dll"))) {
			da->copy(template_path.get_base_dir().path_join("libEGL." + arch + ".dll"), p_path.get_base_dir().path_join("libEGL.dll"), get_chmod_flags());
		}
		if (da->file_exists(template_path.get_base_dir().path_join("libGLESv2." + arch + ".dll"))) {
			da->copy(template_path.get_base_dir().path_join("libGLESv2." + arch + ".dll"), p_path.get_base_dir().path_join("libGLESv2.dll"), get_chmod_flags());
		}
	}
	bool export_as_zip = p_path.ends_with("zip");
	bool embedded = p_preset->get("binary_format/embed_pck");
	String pkg_name;
	if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {