Or do, but practice squeezing the buttons to lock it when you need to. For example, if you hold an iPhone's buttons for more than a couple of seconds, it'll revert to requiring a passcode to unlock, even if you'd normally use face or touch ID to open it.
This doesn't work reliably :) If someone puts a gun straight to your head and tells you not to move you will not want to squeeze any buttons or reach into your pocket.