I think that if the hats get resized that the position of the hat gets re-calculated incorrectly, probably from (X,Y) position that is shifted according to the hat. Simply wearing the hat and returning to the hat-"dialog" screen will already move the position of the hat.
Also seen on the icon, which triggered my small exploration:
I think it is hat size related as it seems to move in the other direction if the hat is smaller.
Using Firefox 95.0 on Ubuntu, mostly mint condition (but includes an add blocker, if that's important). I've included the pictures taken from the Cryptography site.