I cannot lock my MacBook Pro with Shift + Alt + Eject shortcut
To trigger the login window, select System Preferences from the Apple menu, then navigate to Security &amp; Privacy > General. Check "Require password"

You will then set options for the duration within which to require a password. In your case, you want to set it to immediately.