Since this is a program not developed by Apple, we cannot use it as an indicator on if the computer is going to sleep or not.
Of course I can. Here is the program (it's a small Python script):
import time
from datetime import datetime
if __name__ == "__main__":
print("Starting")
counter = 0
while(True):
counter += 1
currentDateAndTime = datetime.now()
print("counter=%s; now=%s" % (counter, currentDateAndTime))
time.sleep(10.0)
I start this program, then lock the screen by pressing Ctrl+Shift+Power. The screen goes dark for a second and then I see the login screen.
After 5 minutes, I enter my password and this is what I see as the output of the Python script:
Starting
counter=1; now=2023-01-12 19:22:30.455574
counter=2; now=2023-01-12 19:22:40.456265
counter=3; now=2023-01-12 19:22:50.457830
counter=4; now=2023-01-12 19:23:00.461610
counter=5; now=2023-01-12 19:23:10.461646
counter=6; now=2023-01-12 19:23:20.465708
counter=7; now=2023-01-12 19:23:30.468552
counter=8; now=2023-01-12 19:23:40.469337
counter=9; now=2023-01-12 19:23:50.470197
counter=10; now=2023-01-12 19:24:00.475407
counter=11; now=2023-01-12 19:24:10.476329
counter=12; now=2023-01-12 19:24:20.483302
counter=13; now=2023-01-12 19:28:30.002651
counter=14; now=2023-01-12 19:28:40.770993
Everything looks normal between counter=1 and counter=12, i.e. the time printed at each iteration is 10 secs later than the time printed at the previous iteration.
But notice the 4m10s mins gap between counter=12 and counter=13. This means the program was not running for the 4m10s between 19:24:20 and 19:28:30.
The only possible explanation is that the computer went to sleep and was not running the program during that time.