I can set the cookie when the app is running on localhost but when i deploy it on vercel the cookie is not set #mern stack

There is an other ticket about the exact same problem => Next auth api route throwing Error: Failed to collect page data for /api/auth/[...nextauth] only on production