After provisioning Teams or M365 Groups, you notice that the target Group mailboxes were not created with the default domain of the target environment.
In ODM there is no logic which would allow you to chose which domain should be used when creating the target objects. The default domain will be used.
Ensure that there is no rule or policy which is taking other domains over the default domain for email address.
Also worth checking the target Audit Logs to see when and by what were the target email addresses updated / created. Most likely there will be entries in the audit logs which would lead you to finding the root cause.
Disable any rule or policy which would affect the email address creation.