This prevents potentially unwanted messages to pop up while screen casting.
A user can overrule this and re-enable notifications any time by unchecking the do not disturb checkbox in notification applet.
This is Wayland-only. On X I think this is a lost cause since any app can just grab the screen. Most apps have some sort of control panel that is visible while recording, but they either have poor metadata or are override redirect and not managed by KWin. While I did a PoC patch for a "do not disturb" window rule and KWin scripting interface, I don't think this is a reliable enough solution... especially since Wayland gives us a proper one.