If you delete the domainA account then the mailbox will be disconnected and no one will be able to access it.
It would be better for you to export the mailbox and recreate it in DomainB. If domain A and Domain B are in the same forest then you can disconnect the mailbox from the domain A account and reconnect it to an account in Domain B.