The in-universe answer for this is that Rex had his phase two armor customized. As said by another poster, it was shown that clones had leeway in their armor designs by the time phase 2 was introduced. This was due to the Jedi wanting to promote individuality in the ranks of the clone troopers, to in part increase morale.
The Kaminoans didn't quite understand humans needs initially, and in canon, Phase 1 armor was more durable but restricted movement and was uncomfortable to wear. Phase 2 fixed comfort issues, but actually offered less protection in the chest area, instead opting to provide protection from battlefield hazards and promoting better comfort.
Rex opted to keep two parts of the phase one armor that he liked better. The chest plate for durability, and the visor for visibility. In fact, the TCW episode "Water War" debuts phase 2 armor in the field, and Rex is seen in that episode on a republic ship, still in his phase 1 armor. This is not actually an animation error, as Rex's custom armor was not ready yet during the Mon Cala Campaign. He mentions in the Rebels episode "The last battle" how his phase one chest plate still holds up, even after many years.
Sources: Wookieepedia, TCW "Water War" trivia gallery, Star Wars Rebels "The Last Battle"