sorry but that is 100% rider error, your foot didn’t slip all by itself and once it had your pedal was “where it was supposed to be”
learn no footers and one footers if you don’t want to repeat it.
cranks will remain in the same position if you learn to no footer properly and the weighted pedal will always drop when one footering unless you remove your rear foot and hold the rear brake or table or whip while your foot is removed.
once you can do both at will you’ll always instinctively know where your pedals are.