Original issue edited, as mentioning idle_threshold and my specific swaylock use case was confusing.
Basically it would be nice if dunst could detect that the session is locked (with ext-session-lock-v1 portal on wayland), so that notifications are paused automatically.