Screen lock not working in Moto z play
It could be (depending on your Android version) there is an extra option called


  powerbutton locks immediately


if that is not selected it could be the problem. You could crawl the security settings for more options.