MetaMask browser extension is protected with a password. when password is entered wallet is unlocked but there is no automatic locking mechanism available. its only possible to lock it manually by going trough menus( 3dot > Lock MetaMask). a Automatic Locking feature should get implemented based on IDLE timer. for example after 5 minute of MetaMask IDLE (when MetaMask popup windows is closed).
it will increase security.