@Robert Österlund Thank you for reaching out to us, As I understand you are looking for information on this error "DeletingLicensedGroupNotAllowed" which is being seen on the Azure AD portal, after deleting the group from on-premise AD.
I have seen this error in the past, it happens because of group that was deleted in AD or removed out of the syncing scope in AD Connect, which in turn will cause a delete operation to be synced to AAD. Nonetheless, the group in the cloud linked to the on-premises object still has a license assigned to it.
Error message AD Connect Sync Service Client - "DeletingLicensedGroupNotAllowed" clearly states that a deletion is being attempted on a Sync'd Group that has Azure AD Group Based licenses applied and delete operation is not allowed. If we allow such operations all the users who are part of this group would be impacted with licenses being removed.
Also refer to this - When a licensed group is deleted for detailed explanation.
Reference: https://learn.microsoft.com/en-us/answers/questions/1000367/sync-error-due-to-deletion-of-licensed-group similar issue has been discussed here.
Let me know if you have any further questions, feel free to post back.
Please remember to "Accept Answer" if answer helped, so that others in the community facing similar issues can easily find the solution.