Changing hardware scaling level breaks AdvancedDynamicTexture control alignment

In order to get crisper UI, I added:
engine.setHardwareScalingLevel(1 / window.devicePixelRatio);
this.advancedTexture.rootContainer.scaleX = window.devicePixelRatio; this.advancedTexture.rootContainer.scaleY = window.devicePixelRatio;
and now when changing the verticalAlignment and horizontalAlignment, the control (in my case, a button) it is offset outside the screen relative to the viewport size
button1.verticalAlignment = BABYLON.GUI.Control.VERTICAL_ALIGNMENT_TOP; button1.horizontalAlignment = BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT; button1.topInPixels = 0; button1.leftInPixels = 0;
Is this normal? How can I avoid this and still have the above button placed in the corner? // uncomment the 2 alignment lines and watch the button disappear. uncomment the top and left position lines to see the

setting this fixes the issue. Is it a good idea? = 100 / window.devicePixelRatio + "%"; advancedTexture.rootContainer.left = 100 / window.devicePixelRatio + "%";

This seems perfectly fine;)