Hello, it is not B4XPages, that application is many years old.
Anyway, as you say, I use a service to process sales, it sends them to a remote computer and it works without problems.
The problem with them turning off the screen is with the graphical environment that the user sees, because when they turn the screen back on, what is displayed does not correspond to the real situation of the processed sale.
Then various random “weird” situations occur.
I tell them not to turn it off, or to configure in settings to turn it off automatically after 5 seconds, for example.
Or wait half a second, but no, they prefer to turn it off quickly.
I have done tests and, basically, to do what these users do, it is necessary to hit the “Process sale” button and the “turn off device” button at almost the same time.