It's actually a good argument for integration between screen-sharing apps and instant messaging/status - your status really should go to "Presenting" when you are presenting and for incoming alerts to automatically be hidden.
That's how Teams works and if I remember rightly even Skype for business/Lync had this way back.
Yes, that was the default behavior in Lync/SfB, but could be changed to not go into "Do Not Disturb" status when sharing your screen or presenting slides.