### 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.
ERR_MAIN_THREAD_GUARD;
	ERR_FAIL_COND(!p_style.is_valid());
	if (theme_style_override.has(p_name)) {
		theme_style_override[p_name]->disconnect("changed", callable_mp(this, &Window::_notify_theme_override_changed));
	}
	theme_style_override[p_name] = p_style;
	theme_style_override[p_name]->connect("changed", callable_mp(this, &Window::_notify_theme_override_changed), CONNECT_REFERENCE_COUNTED);
	_notify_theme_override_changed();
}
void Window::add_theme_font_override(const StringName &p_name, const Ref<Font> &p_font) {
	ERR_MAIN_THREAD_GUARD;
	ERR_FAIL_COND(!p_font.is_valid());
	if (theme_font_override.has(p_name)) {
		theme_font_override[p_name]->disconnect("changed", callable_mp(this, &Window::_notify_theme_override_changed));
	}
	theme_font_override[p_name] = p_font;
	theme_font_override[p_name]->connect("changed", callable_mp(this, &Window::_notify_theme_override_changed), CONNECT_REFERENCE_COUNTED);
	_notify_theme_override_changed();
}
void Window::add_theme_font_size_override(const StringName &p_name, int p_font_size) {
	ERR_MAIN_THREAD_GUARD;
	theme_font_size_override[p_name] = p_font_size;
	_notify_theme_override_changed();
}
void Window::add_theme_color_override(const StringName &p_name, const Color &p_color) {