Have you tried using a program that regularly simulates keypresses or mouse movements so the computer thinks the user is still active? The `SCROLL` key for instance can be pressed without causing unwanted side effects, but it stops my Windoze VM from going to sleep.
I have not, interesting idea and I'll definitively try it out. Thanks!
There are some well-known scripts. All variants of the same pattern.
E.g. https://gist.github.com/LuisAGC/843a2a45617d7ad05687c2f8a15c... or https://github.com/TheBear1616/CapsLock-PreventSleep-Script/...
Scroll lock and F13 are commonly used