Hello, @Nandan NK,
Welcome to the Microsoft Q&A platform!
According to Microsoft official document on mailbox migration (https://learn.microsoft.com/en-us/exchange/hybrid-deployment/move-mailboxes#what-do-you-need-to-know-before-you-begin), after migrating a mailbox, users typically have a 30-day grace period to assign an Office 365 license to the user. If the license isn't assigned in time, the mailbox is probably to be soft-deleted. To solve this, the possible workaround is to license the mailbox immediately once the migration gets done.
If the possibility of untimely license allocation can already be ruled out, it could be due to misconfiguration in Azure AD Connect, such as incorrect OU scoping, deleted on-premises objects, or attribute mapping errors. Please ensure the relevant OUs are included in sync, check that user accounts still exist in on-prem AD, verify synchronization logs for errors. Moreover, if there is a conflict between the local and Office 365 accounts, such as a mismatch of attributes or GUIDs, that could also result in the account being soft deleted. I recommend that you verify that the synchronization settings between your local environment and Office 365 are properly configured.
Finally, if you have a need to restore a softly deleted account, you can use the Microsoft 365 Admin Center or PowerShell to restore a softly deleted account, as described in more detail: https://learn.microsoft.com/en-us/exchange/recipients-in-exchange-online/delete-or-restore-mailboxes#restore-a-user-mailbox.
Should you need more help on this, you can feel free to post back.
If the answer is helpful, please click on ACCEPT ANSWER as it could help other members of the Microsoft Q&A community who have similar questions and are looking for solutions.
Thank you for your support and understanding.
Best Wishes,
Alex Zhang