My MacBook Pro is connected to two external monitors using a docking station. The internal screen lid is constantly closed and I don't usually use it. I only use the external screens.
The problem is that whenever I disconnect the power adapter (while the lid is closed), it triggers a sleeping mode. Therefore I can't unplug the AC adapter and keep working. I would like to prevent my computer from sleeping when the lid is closed and the power is unplugged. Did anyone face this issue and found a solution?
Additional Details:
Remark
Before I opened this thread I found this similar question: https://apple.stackexchange.com/questions/261784/how-to-prevent-screen-lock-when-macbook-ac-adapter-is-unplugged. However, the solution there does not fit my needs, as it prevents the computer from sleeping at all (which is not my intention).