Please people, read the entire thread (it's only two pages) . A link to the thread containing a work-around has been given by "modular747". But to make things easier...
https://discussions.apple.com/thread/4314203?answerId=19665485022#19665485022
SergZak wrote:
I've been testing this for the last 30 minutes or so and found that if the AssistiveTouch panel is the *last thing pressed*, even if it's just to return the panel to it's minimized size, the screen will *not* AutoLock.
To get AutoLock to function normally, something other than the AssitiveTouch panel needs to be pressed. This can be a simple screen swipe.
Because of the additional motion (screen swipe or otherwise) required to get the screen to AutoLock correctly and not stay on indefinitely, I really doubt this is "by design". Seems like a nasty bug that will bite someone hard and kill their battery without them knowing it.