EDIT: I can only repeat this when it is on YOLT after countless attempts. I'm not sure why. My perception is that the spectator camera speeds are faster on that game mode for some reason, regardless of what server you're on, and may be a contributing factor to the misapplication of the hat.
Here's a video, courtesy of ZIMdudeAlchemist, that shows the top hat floating after a round ending. Time 2:32