Working solution from the GitHub:
After some further testing, it appears to only happen when running NextJS in dev mode (with or without turbopack) If I build the site and run it it appears to work as intended. So annoying during development, but at least the actual build works correctly.