im not sure... but thats how alarm usually work rite?
while the alarm ringing you have to turn it off and then the screen goes off eventually (depends on your screen sleep time). After that the device is locked (while screen is off).
your case never happen to me tho.. >_<