To avoid repeatedly unlocking your phone when you are at familiar and trusted locations (like home or work), use a Extend Unlock. You can still manually lock the phone in trusted places when needed.
Make sure you have:
Tap Security and privacy > More security and privacy > Extend Unlock.
If you don't see Extend Unlock, try the following:
Set up your places:

To lock your phone when you're in a trusted place, on the lock screen, tap 
Remove the location from your trusted places:
