Netlify resetting session token cookies in next-auth (only in `netlify deploy`)

site name: ask-paper

I am using Next JS and NextAuth. I did correctly setup the authentication flow, now for a speciific type of tests I want to mock my session and I’m doing this using a custom cookie.
I set it up on client side and everything works normally on both next dev alone, netlify dev with next dev as command, and vercel.

Nevertheless, once I deploy it to a netlify environment, set the cookie manually and refresh the page the /api/auth/session endpoint is always resetting my cookie via the Set-Cookie Header.
I would like to know why is this happening, and why does this only happens in netlify deploy (not in netlify dev).

I checked your website: and I don’t see any set-cookie header. How to reproduce this?