What happens to the average kinetic energy and potential energy of molecules during change of state why there is no temperature change during change of state?

From what I’ve come across the internet, the reason temperature remains constant during phase transitions is that the energy goes into increasing intermolecular potential energy instead of average kinetic energy per molecule (which temperature is a function of). But I still don’t understand how potential energy increases without any change in kinetic energy.

From the intermolecular potential energy curve, any mechanical energy added to a system results in an increase in both time averaged kinetic and potential energy. (For a simple harmonic oscillator, 50% of any energy added goes into potential energy). This explains why specific heat capacities of substances can vary significantly, depending on the proportion of energy that goes into potential energy.

By this logic, shouldn’t any change in potential energy be accompanied by a non zero change in kinetic energy?