Replying to myself as I found an answer to my problem. In Android Developer Options there is an option named “Enable freeform windows”, it was enabled in my case. Disabling it fixed improper scaling.
6 Likes