Turning off the screen bat freezes the applications

  .net-4.8, c++, screen, system.timers.timer, windows

I have a problem with my app.

The application is designed to perform certain tasks periodically.
If it deems it necessary, it must turn off the screen, but it still has to carry out its tasks.
Unfortunately, when the screen turns off, the application stops working. It is as if frozen.
When the screen is turned on (e.g. by clicking a button on the keyboard), the application becomes active again and works properly.
Freezing the application blocks threads, tasks, and even Timers, and freezes completely.

I turn off the screen by calling:

SendMessage (-1, WM_SYSCOMMAND, (IntPtr) SC_MONITORPOWER, (IntPtr) newState);

The application is written in C# .NET Framework 4.8.
Windows 10 Enterpraise LTSC (1809)
Screen lock, screensaver, user logout, etc. is disabled.

Screen is using with eDP.

This problem is on UpBoard computer, it is one-board PC.
On different a laptop, the application works without any problems.

Source: Windows Questions