There is an issue in the azurerm_policy_set_definition documentation. The optional group_names attribute should be documented as policy_group_names, as is it’s actual name as seen in the tfstate files. I spent quite some time on this trying different things, please update to save others from wasting time discovering this issue
azurerm_policy_set_definition | Resources | hashicorp/azurerm | Terraform Registry
tl;dr: group_names attribute should be documented as policy_group_names.