Currently, "dnf download" does not support comps groups as arguments like other commands do. Extending it to support comps groups would make it much easier to create filtered mirrors by downloading subsets of the repository content. Please add support for this. This would also mean that there should be a "dnf group download" command too. Reproducible: Always
I can identify two use cases related to this issue. First, downloading group packages and their dependencies, which can currently be addressed with a workaround: "dnf install @'<group-name>' --downloadonly --installroot <empty_dir> --destdir <custom_dir>". The second involves downloading only the packages listed by the comps group, requiring parsing of the "dnf groupinfo" output and forwarding it to "dnf download". In both cases, reasonable workarounds exist. Am I understanding your request correctly? But anyway, given that dnf is currently in maintenance mode, and introducing new features requires strong justification, I suggest directing this request to dnf5.
The problem with your workaround is that it requires root to work, whereas "dnf download" does not. Anyway, I've moved this to the dnf5 GitHub tracker: https://github.com/rpm-software-management/dnf5/issues/1129