After enabling the CSP to be enforced I realised that every script was blocked and the warning messages shows nonce being empty. After some digging I realised that loadContext does not get populated correctly when deployed on Vercel. That is why nonce defaults to empty string. Similar issue exists on sitemap.xml page where we use the loadContext again.
Any idea what needs to be changed for Vercel server? They have their own handlerRequest method but dont know how to use that