### 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.
#include "window.h"
#include "core/config/project_settings.h"
#include "core/debugger/engine_debugger.h"
#include "core/input/shortcut.h"
#include "core/string/translation.h"
#include "core/variant/variant_parser.h"
#include "scene/gui/control.h"
#include "scene/scene_string_names.h"
#include "scene/theme/theme_db.h"
#include "scene/theme/theme_owner.h"
bool Window::_set(const StringName &p_name, const Variant &p_value) {
	ERR_MAIN_THREAD_GUARD_V(false);
	String name = p_name;
	if (!name.begins_with("theme_override")) {
		return false;
	}
	if (p_value.get_type() == Variant::NIL || (p_value.get_type() == Variant::OBJECT && (Object *)p_value == nullptr)) {
		if (name.begins_with("theme_override_icons/")) {
			String dname = name.get_slicec('/', 1);