### Godot version

4.1.dev (dc625bcbfc5b587ba8867481ee7a1f6a567c25d0)

### System information

Mageia 9, Linux

### Issue description

When importing a project in current `master`, the following error is raised for each asset that gets imported:
```
Attempting to parent and popup a dialog that already has a parent.
```

It seems to be raised once per asset, caused by the progress dialog.

CC @bruvzg

### Steps to reproduce

- Import a new project in Godot that contains importable assets, e.g. https://github.com/RPicster/godot4-demo-desert-light

### Minimal reproduction project

See above.
if (waiting_for_first_scan) {
		return; 
	}
	Ref<ConfigFile> config;
	config.instantiate();
	
	config->load(EditorPaths::get_singleton()->get_project_settings_dir().path_join("editor_layout.cfg"));
	_save_docks_to_config(config, "docks");
	_save_open_scenes_to_config(config);
	_save_central_editor_layout_to_config(config);
	editor_data.get_plugin_window_layout(config);
	config->save(EditorPaths::get_singleton()->get_project_settings_dir().path_join("editor_layout.cfg"));
}
void EditorNode::_save_docks_to_config(Ref<ConfigFile> p_layout, const String &p_section) {
	for (int i = 0; i < DOCK_SLOT_MAX; i++) {
		String names;
		for (int j = 0; j < dock_slot[i]->get_tab_count(); j++) {
			String name = dock_slot[i]->get_tab_control(j)->get_name();
			if (!names.is_empty()) {
				names += ",";
			}
			names += name;
		}
		String config_key = "dock_" + itos(i + 1);
		if (p_layout->has_section_key(p_section, config_key)) {
			p_layout->erase_section_key(p_section, config_key);
		}
		if (!names.is_empty()) {