If you run a MacBook with the lid closed, "never sleep on power" doesn't do what it says. With the lid shut, macOS only stays awake while an external display is on. Mine went to sleep every time the monitor turned off, and whatever was supposed to run on it while I was away stopped with it.
The fix is a built-in command: caffeinate -s, started at login by a LaunchAgent. It holds a sleep assertion that macOS only honors on AC power, so on battery the Mac still sleeps as usual, and it needs no sudo. I skipped pmset disablesleep because that keeps the Mac awake on battery too, even in a bag.