The check for removing unused groups from comps file checks for modular variant, but only matches the case where modules are explicitly listed, not when koji tag with modules is specified. It should cover both cases.
if variant.groups or variant.modules is not None or variant.type != "variant":
Causes https://pagure.io/releng/issue/11117
Proposed fix: #1641
Commit 47984904 fixes this issue
Metadata Update from @onosek: - Issue set to the milestone: 4.3.7
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/pungi/pungi/issues/1640
Please continue any further discussion there.