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

if (!DirAccess::exists(p_path.get_base_dir())) {
		add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Template"), TTR("The given export path doesn't exist."));
		return ERR_FILE_BAD_PATH;
	}
	String custom_debug = p_preset->get("custom_template/debug");
	String custom_release = p_preset->get("custom_template/release");
	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", p_preset->get("binary_format/architecture")));
	}
	if (!template_path.is_empty() && !FileAccess::exists(template_path)) {
		add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Template"), vformat(TTR("Template file not found: \"%s\"."), template_path));
		return ERR_FILE_NOT_FOUND;
	}
	String wrapper_template_path = template_path.get_basename() + "_console.exe";
	int con_wrapper_mode = p_preset->get("debug/export_console_wrapper");
	bool copy_wrapper = (con_wrapper_mode == 1 && p_debug) || (con_wrapper_mode == 2);
	Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
	da->make_dir_recursive(p_path.get_base_dir());
	Error err = da->copy(template_path, p_path, get_chmod_flags());
	if (err == OK && copy_wrapper && FileAccess::exists(wrapper_template_path)) {
		err = da->copy(wrapper_template_path, p_path.get_basename() + ".console.exe", get_chmod_flags());
	}
	if (err != OK) {
		add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Template"), TTR("Failed to copy export template."));
	}
	return err;
}
Error EditorExportPlatformPC::export_project_data(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {