Next.js sitemap.xml returns 404 on Vercel production with dynamic data

The same issue. i do think this is a regression with nextjs itself. for now im manually adding a script to add the sitemap after the build.