Oh, yeah... If Im not mistaken that's some sort of driver related issue.
TBH the only way you *might* be able to do something about that... is to hook the power button event/intent in an app kill the foreground app, then lock/turn off the screen or return to the original event.
Though, that's a bit more complicated than my example.
You could try to do like the previous person suggested and setup a tasker profile to do something similar. Though you wouldnt be able to use the power button. You'd have to likely setup some gesture (shaking/whiping the phone for example)