Next.js links reload whole page after deploying on vercel

I was able to reproduce this based your vercel.json file

The builds property is deprecated and degrades a few things, including client side navigation it seems. The recommended way to implement this is using Vercel’s Monorepo Support

  1. Delete your vercel.json file
  2. Set the framework to Next.js and the root directory to /frontend
  3. Create a separate project on Vercel for your backend. This can be the same git repository, just with a different root directory set.