I've already opened the issue on GeckoLib repo and they insist that this is a problem with CPM: bernie-g/geckolib#795 (comment)
In short - GeckoLib-based mods render armor either incorrectly (depending on the model you have) or render it when they shouldn't.
In this case the hat shouldn't be rendered.