Good news! I have found a new setting in Communication Services under Email: "SMTP Usernames". There you can add custom SMTP usernames, either as a email address, or as free text username. Then you change the long username consisting of <Azure Communication Services Resource name>|<Entra Application ID>|<Entra Tenant ID> to the custom username instead, and it just works!
When I first added a post in here, the status told me "Missing permissions" and details stating that the Entra Application did not have these permissions.
Microsoft.Communication/CommunicationServices/read
Microsoft.Communication/CommunicationServices/write
However, I found out that this is related to case sensitive comparision. The application had correct permissions, but Read and Write was with capital first letter. You can still use the username, but if you want to have a valid status, edit the custom role, open up the json editor and change to lowercase: