Assuming the Customer Portal is the page you're referring to here in which you click "Return to [site]" and are redirected to the wrong page, then most likely the code that is creating the Customer Portal session is passing this incorrect return_url. I'm not familiar with this Vercel template at all, but if you have access to the code, then you need to modify this return url.