### 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 json_description = "{\"images\":[";
	String sizes;
	Ref<DirAccess> da = DirAccess::open(p_iconset_dir);
	ERR_FAIL_COND_V_MSG(da.is_null(), ERR_CANT_OPEN, "Cannot open directory '" + p_iconset_dir + "'.");
	Color boot_bg_color = GLOBAL_GET("application/boot_splash/bg_color");
	for (uint64_t i = 0; i < (sizeof(icon_infos) / sizeof(icon_infos[0])); ++i) {
		IconInfo info = icon_infos[i];
		int side_size = String(info.actual_size_side).to_int();
		String icon_path = p_preset->get(info.preset_key);
		if (icon_path.length() == 0) {
			
			icon_path = GLOBAL_GET("application/config/icon");
			Ref<Image> img = memnew(Image);
			Error err = ImageLoader::load_image(icon_path, img);
			if (err != OK) {
				add_message(EXPORT_MESSAGE_ERROR, TTR("Export Icons"), vformat("Invalid icon (%s): '%s'.", info.preset_key, icon_path));
				return ERR_UNCONFIGURED;
			} else if (info.force_opaque && img->detect_alpha() != Image::ALPHA_NONE) {
				add_message(EXPORT_MESSAGE_WARNING, TTR("Export Icons"), vformat("Icon (%s) must be opaque.", info.preset_key));
				img->resize(side_size, side_size, (Image::Interpolation)(p_preset->get("application/icon_interpolation").operator int()));
				Ref<Image> new_img = Image::create_empty(side_size, side_size, false, Image::FORMAT_RGBA8);