Getting the immersive screen size You can use the immersiveWidth and immersiveHeight methods to find out the dimensions of the screen with the system UI hidden, regardless of the current screen state.
FULL
Standard features about screen size : construct.net/en/tutorials/supporting-multiple-screen-sizes-17
Existing system expressions :
ViewportWidth(layer)
ViewportHeight(layer)
You seem to put a lot of energy into reinventing the wheel. Perhaps you should check what is actually available in Construct first, and then, you might expand it with valuable third-part addons.
because I didn't check system features any further, so I don't know.
Sorry.