I have one windows server with its AD synced to Azure AD with AD connect, the users are using O365. Some accounts in this tenant are then invited to another tenant as guest accounts.
Many thanks for any pointers
When you delete an on-premises AD account that is synced to Azure AD (AAD) via Azure AD Connect:
The corresponding account in Azure AD will also be deleted (soft delete) during the next synchronization cycle. It doesn't get disabled; it gets removed. This doesn't mean the account gets deleted immediately from AAD. It goes into a "soft delete" state, where you have a 30-day period during which you can restore the user account. After this 30-day period, it is permanently deleted.
The guest account in another Azure AD tenant doesn't get deleted automatically when the original Azure AD account gets deleted. The guest account's status in the external directory might be set to "External - User account disabled" if the original account is no longer accessible. However, the account itself will remain until manually removed by an administrator in that tenant.
Guest accounts (B2B) are essentially references or pointers back to the original Azure AD account, and while certain aspects of their state may be linked to the original account, their lifecycle isn't tightly coupled. That is, deleting the original account won't auto-delete the guest account.