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

const char *name;
		const char *mask_name;
		bool is_png;
		int size;
	;
	static const MacOSIconInfo icon_infos[] = {
		{ "ic10", "", true, 1024 , 
		{ "ic09", "", true, 512 , //
		{ "ic14", "", true, 512 , //256×256@2x 32-bit "retina" PNG
		{ "ic08", "", true, 256 , //256×256 32-bit PNG
		{ "ic13", "", true, 256 , //128×128@2x 32-bit "retina" PNG
		{ "ic07", "", true, 128 , //128×128 32-bit PNG
		{ "ic12", "", true, 64 , //32×32@2× 32-bit "retina" PNG
		{ "ic11", "", true, 32 , //16×16@2× 32-bit "retina" PNG
		{ "il32", "l8mk", false, 32 , //32×32 24-bit RLE + 8-bit uncompressed mask
		{ "is32", "s8mk", false, 16  //16×16 24-bit RLE + 8-bit uncompressed mask
	;
	for (uint64_t i = 0; i < (sizeof(icon_infos) / sizeof(icon_infos[0])); ++i) {
		Ref<Image> copy = p_icon->duplicate();
		copy->convert(Image::FORMAT_RGBA8);
		copy->resize(icon_infos[i].size, icon_infos[i].size, (Image::Interpolation)(p_preset->get("application/icon_interpolation").operator int()));
		if (icon_infos[i].is_png) {
			// Encode PNG icon.
			Vector<uint8_t> png_buffer;
			Error err = PNGDriverCommon::image_to_png(copy, png_buffer);
			= OK) {
				int ofs = data.size();
				uint64_t len = png_buffer.size();
				data.resize(data.size() + len + 8);
				memcpy(&data.write[ofs + 8], png_buffer.ptr(), len);