Domain based i18n 500 page error redirects to default locale

We are using the pages router and using i18n config. Our middleware does not use the locale to reroute or redirect requests.
Logging the errors locally works just fine.

The 500.js chunk is served properly: https://www.diamondsbyme.com/_next/static/chunks/pages/500-fb35dc0774e07ed3.js

We do not use Cloudflare workers or edge functions. We only cache the JSON files in Cloudflare.

I have a feeling it might be connected to my other issue: Domain routing i18n adds default locale to link href's