I wasn't happy with Notifications alerts either frequently disappearing before I saw them or nagging at my consciousness until I stopped what I was doing and dismissed them, so I searched and found
Keyboard shortcut to dismiss notifications.
It's a snap to set up, but (as joemike has warned) a major PIA to activate, because activation requires several steps, and it's got to be activated in every app in which you want to use it.
Note: Since the instructions were written, Automator has changed, and you can no longer select "Service" as you document type; you've now got to select "Quick Action."