LTspicePowerSim
Flyback — peak current mode with PI loop
LTspicePowerSim's 24 V to 5 V flyback, its boundary-mode latch and compensator replaced by a clocked current-mode switch.
Try this
Halve the load resistance: the peak primary current rises from 1.08 A to 1.71 A and the output stays at 5 V. Then press Run again.