Hi,
Typically, this error message means that the distribution group has restricted the sender's emails. When sending mail from shared mailbox device@BBBdomain.com, mail is delivered.But when sending from device@AAAdomain.com ,it failed.This may be because the distribution group has restrictions set, for example__device@BBBdomain.com__ is allowed to send mail, but device@AAA domain.com is not allowed to send mail.
You can check it in EAC:Groups->Settings->Edit Delivery management, check any settings in the “Specifiedd senders”.
And more details you can refer to : Fix NDR error 5.7.133 in Exchange Online - Exchange | Microsoft Learn
Please feel free to contact me for any updates.