Self Managed instance generating new cloud license each sync

# Bug

## Summary

Customer is using a cloud license activation code on two separate instances.  One instance has activated and installed one license; the other instance appears to be syncing and retrieving a new cloud license every day for the same subscription

[customer ticket](https://gitlab.zendesk.com/agent/tickets/336444)  
[customer account](https://customers.gitlab.com/admin/customer/1315/edit)  
[subscription](https://www.zuora.com/apps/Subscription.do?method=view&id=8a128eda83b63aee0183c25ad8dc10cb)  
[instance activations](https://customers.gitlab.com/admin/cloud_activation/12486/list_self_managed_instance_activations)

**The server duplicating licenses is instance id 4632**

```ruby
#<SelfManagedInstanceActivation:0x00005608b3a21018
 id: 4717,
 created_at: Tue, 11 Oct 2022 11:30:05.625817000 UTC +00:00,
 updated_at: Tue, 11 Oct 2022 11:30:05.639788000 UTC +00:00,
 activated_at: Tue, 11 Oct 2022 11:30:05.639221000 UTC +00:00,
 self_managed_instance_id: 4632,
 cloud_activation_id: 12486>
#<SelfManagedInstance:0x00005608b3bdb598
 id: 4632,
 created_at: Tue, 11 Oct 2022 11:30:05.617226000 UTC +00:00,
 updated_at: Tue, 11 Oct 2022 11:30:05.617226000 UTC +00:00,
 instance_identifier: "dd942c34-9529-4bcb-829d-51f2707fa289">

#<SelfManagedInstanceActivation:0x00005608b595da08
 id: 4727,
 created_at: Tue, 11 Oct 2022 14:32:54.200416000 UTC +00:00,
 updated_at: Tue, 11 Oct 2022 14:32:54.210432000 UTC +00:00,
 activated_at: Tue, 11 Oct 2022 14:32:54.210054000 UTC +00:00,
 self_managed_instance_id: 4642,
 cloud_activation_id: 12486>
#<SelfManagedInstance:0x00005608b4cb99f0
 id: 4642,
 created_at: Tue, 11 Oct 2022 14:32:54.193613000 UTC +00:00,
 updated_at: Tue, 11 Oct 2022 14:32:54.193613000 UTC +00:00,
 instance_identifier: "f7e0452b-2be6-4a53-8b5c-68cf0696846f">
```

According to the most recent `LicenseSeatLink` entries for each instance:

instance id 4642 is running GitLab 15.3.4-ee as of Wed, 26 Oct 2022 04:56:09.270189000 UTC  
instance id 4632 is running GitLab 15.4.0-ee as of Wed, 26 Oct 2022 04:18:07.674231000 UTC


```ruby
SelfManagedInstanceActivation.find(4717).licenses.count
=> 13

SelfManagedInstanceActivation.find(4727).licenses.count
=> 2
```

## Steps to reproduce

Unsure


## Relevant logs and/or screenshots

screenshot from customer's server with the duplicate licenses, taken roughly 2022-10-18

![screenshot-2022-10-26-15-31](/uploads/b04d655a527c1fe634dee2840e617817/screenshot-2022-10-26-15-31.png)

## Workarounds

This is mostly cosmetic on the customer's side.  On our side, it is generating superfluous licenses but otherwise causes no issues that I see

## Reported examples

1. https://gitlab.zendesk.com/agent/tickets/336444
1. https://gitlab.zendesk.com/agent/tickets/340985
1. https://gitlab.zendesk.com/agent/tickets/341699
2. https://gitlab.zendesk.com/agent/tickets/339642
3. https://gitlab.zendesk.com/agent/tickets/352894
4. https://gitlab.zendesk.com/agent/tickets/372289
5. https://gitlab.zendesk.com/agent/tickets/373382

<!---
Please add both severity and priority level according to: https://docs.gitlab.com/ee/development/contributing/issue_workflow.html#severity-labels
--->

## Proposal

We could look into changing one of these two:
1. Changing the callback from `before_validation` to `after_initialize` ([relevant code](https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/53b47c47e5ed54c849dc014d8b710d367250cacf/app/models/license.rb#L83))
2. Perform a `valid?` call on the new built license before comparing it to the most recent license ([relevant code](https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/53b47c47e5ed54c849dc014d8b710d367250cacf/app/services/build_license_from_subscription_service.rb#L43) and [this code](https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/53b47c47e5ed54c849dc014d8b710d367250cacf/app/services/license_notification_service.rb#L92)).
  - We could even consider calling the `valid?` in the [`License#equal_to?` method](https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/53b47c47e5ed54c849dc014d8b710d367250cacf/app/models/license.rb#L157).

Story points: 1.0