After hours of debugging and narrowing down the issues, ended up it was because of vercel.json which unknowingly trying to rewrite all paths...
vercel.json
{ "rewrites": [ { "source": "/:path*", "destination": "/" } ] }