StackOverflow to the rescue!
This (or any for that matter) addition to the css can be easily done using sass: https://www.mxblog.nl/2016/03/using-sass-with-mendix/
This is a bug. And a big one. Modal means modal. By definition the main-window and all its elements should be inactive, untouchable, non-interfering at all for as long as the modal window is still active. So your best bet is to report a bug at Mendix and have them solve this bug. Mendix will be a platform for it.
Since no prior answers worked for me i solved the problem by some researches and found out you can add a style to a element if it contains a specific element. By this you can check your body if it contains a .modal-dialog and apply a style to it. Here’s what worked for me:
This should block the scrolling on pages automatically once you open a page with the popup type “Modal pop-up”.
Tested in Studio Version 9.24.2