Thank you @cilefen for looking into this and showing me this website to help with debugging. I was able to narrow down the issue being caused by my custom theme, which later I was able to narrow down the problem being a blank line in my .theme file which i thought was empty. As soon as I removed the blank line everything works.
gukki → created an issue.
Ran into this parse error, would happen on firefox and safari, but didnt occur with chrome
#10 also worked for me when working locally with DDEV, but it still wouldnt work on the stage site
In my case I noticed the response headers on the stage were missing the content-encoding: gzip
Tweaked our nginx.conf with some additional gzip settings and it finally worked