In the case when an account was deleted and the mailbox was orphaned, you can create a new account, then link the old mailbox to the new account.
Prerequisites
These commands require the ExchangeOnlineManagement module.
Commands
Get the ExchangeGuid from the source and target mailboxes
$SourceMailbox = (Get-Mailbox -SoftDeletedMailbox [email protected]).ExchangeGuid
$TargetMailbox = (Get-Mailbox -Identity [email protected]).ExchangeGuid
Run the restore
New-MailboxRestoreRequest -SourceMailbox $SourceMailbox -TargetMailbox $TargetMailbox -AllowLegacyDNMismatch