Hi @Jonathan Priyaraj,
Welcome to the Microsoft forum.
Based on your description, my understanding is that you want to delete a user's mailbox but retain its Azure AD account . Please point out any misunderstandings.
In order to achieve this,you can disable the mailbox by running the command like
Disable-Mailbox -Identity "John Woods" in Exchange Online PowerShell.
The Disable-Mailbox cmdlet removes the mailbox's Exchange attributes from Azure AD. The mailbox isn't deleted and can be reconnected to its user at a later date by using the Connect-Mailbox cmdlet. For more information please refer to: Disable-Mailbox (ExchangePowerShell) | Microsoft Learn Also,when you disable a mailbox, the Exchange attributes are removed from the corresponding Azure AD user account, but the user account is retained. Disabled and deleted mailboxes are retained in the mailbox database until the deleted mailbox retention period expires, which is 30 days by default. After the retention period expires, the mailbox is permanently deleted (also called purged).You can refer to : Disconnected mailboxes | Microsoft Learn
Hope this helps!