When using the same attribute in multiple groups, it is strongly advised to use only one of these groups for the same product afterward. For example, an attribute Resolution with terms like Full-HD and 4K could be part of a group named Screen (like the resolution of a monitor) and another group name...
Adding an attribute group with an already deleted attribute (without saving in between) doesn’t re-add it at the moment. Simply reload the product edit page, re-add the desired attributes or groups again and you’re good to go.