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

bool EditorExportPlatformMacOS::is_executable(const String &p_path) const {
	return MachO::is_macho(p_path) || LipO::is_lipo(p_path) || is_shebang(p_path);
Error EditorExportPlatformMacOS::_export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path) {
	Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::WRITE);
	.is_null()) {
		add_message(EXPORT_MESSAGE_ERROR, TTR("Debug Script Export"), vformat(TTR("Could not open file \"%s\"."), p_path));
		return ERR_CANT_CREATE;
	
	f->store_line("#!/bin/sh");
	f->store_line("echo -ne '\\033c\\033]0;" + p_app_name + "\\a'");
	f->store_line("");
	f->store_line("function app_realpath() {");
	f->store_line("    SOURCE=$1");
	f->store_line("    while [ -h \"$SOURCE\" ]; do");
	f->store_line("        DIR=$(dirname \"$SOURCE\")");
	f->store_line("        SOURCE=$(readlink \"$SOURCE\")");
	f->store_line("        [[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE");
	f->store_line("    done");
	f->store_line("    echo \"$( cd -P \"$( dirname \"$SOURCE\" )\" >/dev/null 2>&1 && pwd )\"");
	f->store_line("");
	f->store_line("");
	f->store_line("BASE_PATH=\"$(app_realpath \"${BASH_SOURCE[0]\")\"");
	f->store_line("\"$BASE_PATH/" + p_pkg_name + "\" \"$@\"");
	f->store_line("");
	return OK;
Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
	ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
	String src_pkg_name;
	EditorProgress ep("export", TTR("Exporting for macOS"), 3, true);
	if (p_debug) {