Sounds like he his pulling out of the shoe, not pulling out of the pedal. This can happen because you are not pedaling smoothly, which takes more concentration on hard climbs. You can also try tightening your laces or straps more, but make sure your cleats are properly aligned to avoid twisting your knee.