I've been having this issue for some time now and I've been unable to fix it. Essentially I have set my exceptions for my dnd where it's supposed to block notifications (no alerts + no pop ups) for certain apps for instance, Snapchat and Instagram messages should be blocked when dnd is turned on.
However, the dnd process doesn't do this. I'm just generally using my phone with dnd turned on and I still receive messages/pop ups from s Snapchat and Instagram. I contacted Samsung support regarding this and they gave me an option to factory reset my phone or reset settings which I have both done. Resetting my settings seemed to fix it for a bit till the problem became redundant again.
Now that this problem persists, I cannot seem to find a solution. This can be really annoying whenever I'm sleeping and set my phone to vibrate and dnd turned on. I'm only supposed to get notifications from the apps that I have allowed and blocked from the others but yet again, it doesn't do so.