This is why I wrote this Macro a few years ago. It still works as of macOS Sequoia and Keyboard Maestro 11.
For more information, see the wiki Searching the Forum for Answers section.