### 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;
	content_scale_mode = p_mode;
	_update_viewport_size();
}
Window::ContentScaleMode Window::get_content_scale_mode() const {
	ERR_READ_THREAD_GUARD_V(CONTENT_SCALE_MODE_DISABLED);
	return content_scale_mode;
}
void Window::set_content_scale_aspect(ContentScaleAspect p_aspect) {
	ERR_MAIN_THREAD_GUARD;
	content_scale_aspect = p_aspect;
	_update_viewport_size();
}
Window::ContentScaleAspect Window::get_content_scale_aspect() const {
	ERR_READ_THREAD_GUARD_V(CONTENT_SCALE_ASPECT_IGNORE);
	return content_scale_aspect;
}
void Window::set_content_scale_factor(real_t p_factor) {
	ERR_MAIN_THREAD_GUARD;
	ERR_FAIL_COND(p_factor <= 0);
	content_scale_factor = p_factor;
	_update_viewport_size();
}
real_t Window::get_content_scale_factor() const {
	ERR_READ_THREAD_GUARD_V(0);
	return content_scale_factor;
}
void Window::set_use_font_oversampling(bool p_oversampling) {