Persistent Jahn-Teller distortion across a high-temperature phase transition in Cr⁢𝑋2 (𝑋=Br, I)