Interesting. Safari also adjusts the hdr over a few seconds so when you alt tab to it, the qr code becomes a lot brighter. Also firefox looks really bland right next to it.
Also just found a good reason to not use this hack with Chrome, maxes out the CPU. I left this in the background for an hour or so and I noticed my laptop getting warm. Checked with htop and Chrome was guilty. Closed it and it went back to normal. The only open tab: this thing.
Chrome also seems to support hdr. It's just Firefox that doesn't support this yet. There's an open issue for this: https://bugzilla.mozilla.org/show_bug.cgi?id=1793091
More interesting is whether CSS will be fixed to support this. There seems to be some recent work on this: https://w3c.github.io/ColorWeb-CG/
So, this hack might long term not be needed if this gets addressed properly.