### 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 (current.position.x < parent_rect.position.x) {
		current.position.x = parent_rect.position.x;
	}
	if (current.position.y + current.size.y > parent_rect.position.y + parent_rect.size.y) {
		current.position.y = parent_rect.position.y + parent_rect.size.y - current.size.y;
	}
	if (current.position.y < parent_rect.position.y) {
		current.position.y = parent_rect.position.y;
	}
	if (current.size.y > parent_rect.size.y) {
		current.size.y = parent_rect.size.y;
	}
	if (current.size.x > parent_rect.size.x) {
		current.size.x = parent_rect.size.x;
	}
	
	Size2i popup_max_size = get_max_size();
	if (popup_max_size <= Size2()) {
		return current;
	}
	if (current.size.x > popup_max_size.x) {
		current.size.x = popup_max_size.x;
	}
	if (current.size.y > popup_max_size.y) {
		current.size.y = popup_max_size.y;
	}
	return current;
}
Popup::Popup() {