This question already has an answer here:
My 2018 MacBook Pro is connected to external displays and peripherals via a Thunderbolt 3 dock.
When I step away from my desk I lock the computer by pressing ctrl+cmd+Q on my external keyboard.
This works as expected, kicking the system back to the lock screen.
However, after a few minutes of this state, the system goes to sleep, turning off the screen and requiring time to become interactive again after jabbing the power button.
How can I prevent the laptop from going to sleep once locked if connected to power? The most important aspect of this is that Touch ID stays active, so I can instantly resume work at my desk with a single touch of the sensor.