Found the solution. sameSite value had to be set to "none" and secure had to be true in the cookie.
sameSite
"none"
secure
true