If this Pokemon is a Palafin in Zero Form, switching out has it change to Hero Form.
Introduced in Generation 9.