Cors error with angular ng serve + .Net with cookie authentication flow

We’re using the cookie auth flow with .net and angular and the Auth0.AspNetCore.Authentication nuget package to setup the integration with auth0.
We have angular app configured to be served out of backend and in that scenario we don’t have any issues during the authentication.
But when run the client app with ng serve then we run into this CORS issue when the client app is being redirected to auth0 for login:

Access to XMLHttpRequest at '' (redirected from 'https://localhost:4200/account/user') from origin 'https://localhost:4200' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://localhost:4200' that is not equal to the supplied origin.

Everything on auth0 side looks configured properly. We have allowed this URL as the allowed in CORS config.

Any ideas on how we can resolve this?