Poor quality power button flex cable, after a reair iv dont useing same china part my customers power button works 100% can turn on and off hahaha so heres the prob you cant lock the screen with a quick touch of the power button.
others have said check setting as theres had changed during a repair and also reset device. NONE OF THOSE WORKED FOR ME i replaced with oem part from apple NOW ALL GOOD.