The guest accounts are just a reference to the original account and whenever we invite any user from a different AAD tenant a new object gets created within the local azure AD which references to the external Azure AD account . You can see the source for these users would be External Azure Active Directory as shown in image below.
In your case if you have 50 guest accounts from @company-x.com in @company-y.com and you remove the domain from the tenant of @company-x.com those accounts do not get removed from the @company-y.com tenant and you would need to delete them before inviting the accounts again. The guest accounts do not get converted to users . yes , you have to remove them and let them resync from Azure AD connect . and in case of sharepoint/teams , you will have to re-invite / re-add them again because its not the same object now . The moment the domain was moved to another new tenant and the users were synced to this new tenant even though the UPN looks same but the object ID and SID in the Azure back-end changes. Same goes for the guest accounts . So any tenant which has invited these users earlier would have to delete their old guest account and re-invite them .
So for example if you have moved the domain(c2.com) from one tenant (tenant A) to another tenant(tenant A) and now have the same user synced having same resultant UPN address as before user@c2.com , and you try to logon to the old sharepoint where user@c2.com was invited and still exists in the AAD as a guest user , you will see the following error.
this will happen despite the user being present as a guest with same UPN , but that user is a different one with different object ID so they may look same but are not same and old user (user@c2.com) may need to be deleted and an invite sent again to the new user user@c2.com from the new Azure AD tenant.
I hope this was helpful and answers your queries. Consolidations are always a little complicated due to technical imitations of what can/cannot be done. In case of any further queries please let us know and we will be happy to help . If the information provided helped , please accept this as answer so that its helpful for other members of the community .
Thank you.