If the IR sensor in the top corner is closed the screen should stay locked. Have you checked this works?