"butt" dialing is a thing, you know.
Why not just accept that random/accidental phone calls can add spice to your life?
But, in all seriousness .... Even if that were possible - what would be the worst thing that can happen?
(I don't think that I have EVER pocketed my iPhone with the keypad screen open. )
I always lock my screen before putting my phone back into my pocket.
However, I once had a 5 that had a (rarely) malfunctioning lock button. I only realized it was not locking every time I pushed it when my phone posted a status update to Facebook while in my pocket with my location and a bunch of gibberish text!