Hey guys, first of all let me say that I have the HTC Sensation, and I have this problem. With the addition that often times, when I lock my phone, the display comes immediately back on, but locked of course. What's bad about this is that sometimes, the display NEVER turns off in this case. The only way I know that this is happening is that my phone slowly gets warmer in my pocket. I have performed a factory reset on the phone with no results. I have also tried all settings combinations that I can think of, including stripping my home screen down to bare (and trying Launcher Pro) when I thought responsiveness could be a factor.
To all the people who are clearly incapable of understanding this simple problem, and claim that it is behavior as intended by the developers; please do not ever post on another support forum in your lifetime... I feel empathetic frustration for the previous posters of this problem.
That being said, I will put in my two pennies.
I believe that this problem is a combination of hardware and software problems. It will likely be something we just have to live with as long as we have this phone. That is unless the android developers/HTC developers can make it so that the software can handle the faulty power button behavior.
However, I have found a possible temporary solution after staring at the button underneath the cover for a little bit. I've found (at least I trick myself into thinking) that consistently pressing the power button down and to the face of the phone when locking/unlocking helps a lot. Such as what a person might naturally do when holding the phone in their left hand. I have always held my phone in my right hand in the past, and pressed the button differently. This may be completely bogus, but I've gone all day without a screenshot or flickering lock screen... which hasn't happened for a while.