Auto lock that PC as soon as you step away

With cybercrime incidents on the rise, we still forget to lock our computers when stepping away. Did you know that Windows OS has the ability to detect this and lock itself automatically? Well, not us but if our phone goes a certain distance away. Maybe macOS does too, I don’t know. I believe that organizations should encourage their staff to use this excellent functionality Windows provides.  What are your thoughts?