Ok actually I'm just dumb. The reason it works from discord (and if you just copy and paste the link into your browser) is because the text of the link is different than the link itself.
Here's the link that didn't work: https://html-classic.itch.zone/html/13132807/index.html, if you inspect (F12) it you'll see that it actually references https://html-classic.itch.zone/html/13125831/index.html, an older build of the game which is no longer available, hence the error. Obviously, if you paste that link into your browser or Discord it loses that reference and just becomes the original text which is right.
I have to be careful when updating the link in the description of my game or it might inherit the href from the link that was there but replace the text! Another option is to just click the little link button in the itch text editor and replace the link there too. Either way, something to be careful of! Make sure your hyperlinks are going to the right source!