### 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_READ_THREAD_GUARD_V(0);
	if (!initialized) {
		WARN_PRINT_ONCE("Attempting to access theme items too early; prefer NOTIFICATION_POSTINITIALIZE and NOTIFICATION_THEME_CHANGED");
	}
	if (p_theme_type == StringName() || p_theme_type == get_class_name() || p_theme_type == theme_type_variation) {
		const int *constant = theme_constant_override.getptr(p_name);
		if (constant) {
			return *constant;
		}
	}
	if (theme_constant_cache.has(p_theme_type) && theme_constant_cache[p_theme_type].has(p_name)) {
		return theme_constant_cache[p_theme_type][p_name];
	}
	List<StringName> theme_types;
	theme_owner->get_theme_type_dependencies(this, p_theme_type, &theme_types);
	int constant = theme_owner->get_theme_item_in_types(Theme::DATA_TYPE_CONSTANT, p_name, theme_types);
	theme_constant_cache[p_theme_type][p_name] = constant;
	return constant;
}
bool Window::has_theme_icon(const StringName &p_name, const StringName &p_theme_type) const {