3 Answers
3

Sleep mode is designed to suspend apps so the system can sleep. (All apps and most of the OS stop executing and some hardware is turned off to save battery.)

There is no fix for this other than setting your system to not sleep. You can do this permanently in the Energy Saver preference pane or temporarily by using an app like Jiggler or a command-line utility like caffeinate.

Some of the information contained in this post requires additional references. Please edit to add citations to reliable sources that support the assertions made here. Unsourced material may be disputed or deleted.