Problems with M365 Exchange Online Mails

We tried to add a M365 Mail account with app registration, which seems to work.
But we now have the problem, that all mails land in spam because we have SPF, DKIM and DMARC in place. Frappe support does not seem to understand the problem but I’m sure we would need to include erpnext in our spf. Does anyone know the entries needed?
Also we have the problem that the sender adress of the mails is firstname.lastname=domain.com@mail.frappe.com instead of firstname.lastname@domain.com.
Has anyone a working config with M365 that does work and not land in spam?

Have you got any solution for this as we are also facing the same Issue