Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I'm employing the easiest fix of all. I've simply stopped using mine as a phone. It didn't succeed at that anyway. Having sold my iPod touch a few weeks ago I've simply decided to use my iPhone 4 to replace it. I've rotated one of my other smartphones back into position as my primary device, and all is fine.

So this is what we have resorted to. Using our iPhones as iPods. Wow!
 
I'm pretty sure that this is an iOS 4 problem, not necessarily an iPhone 4 problem.

The reason I say that is because when I received my new phone I restored and updated my old 3GS to iOS 4 and gave it to my Mom. She told me that it exhibits the same issue of sporadically turning on the screen when on a call. It never did that to me before the software update.

I've learned to watch the screen in my peripheral vision. If I see it light up, moving it slightly away from my face and then putting it back usually turns the screen back off. I've noticed it tends to happen when the phone is held loosely to my face like when I'm propping it with my shoulder. I'm sure they just need to adjust the sensitivity of the proximity sensor via a software update.
 
When you hold the iPhone up to your face to talk on the phone, there is a sensor that tells the phone to turn off the screen so that your cheek doesn't accidentally put your call into speakerphone, start dialing numbers, or checking contacts.

Some people (myself included before I got a replacement phone) have had issues where the sensor was not turning the screen off and therefore they were pressing buttons on the screen with their cheek while in the middle of a call. Not cool.

Mine is doing this too. Nothing worked as a fix. You exchanged your phone and the new one isn't doing it?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.