I want to open Mautic in iframe but after clicking login, it redirects to login instead of dashboard

I want to open Mautic in an Iframe, it opens on the login screen but when i click on login, It redirects back to the login page instead of dashboard.
also I am having cors error in the console.

Uncaught DOMException: Blocked a frame with origin “https://my-mautic-url” from accessing a cross-origin frame.