I see, thanks for responding.
Sadly I do not see any other way to get the implementation that I want: Disable input from "background" with messagebox
The problem is that I have a rather large display and redrawing the entire thing just to disable the background for a small message box seems counter-intuitive.
The safest option would be to only clear/add flags on objects where this is is “safe” to do.
Is there perhaps a way to figure out which objects?