@User just to recap the issue and the solution: You were using
https://localhost as your API domain and that caused an issue of incorrectly setting cookie config, which prevented the browser to store the cookies. This was solved by adding samesite=none and secure flag to the generated cookies.