StackOverflow to the rescue!
https://stackoverflow.com/questions/9538868/prevent-body-from-scrolling-when-a-modal-is-opened
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/
Good luck!
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.
Alas a javascript-bugfix like the Stackoverflow example will probably work for you and you will be in the clear, but it would be so much better is Mendix would solve this.
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