How to get rid of a persistent macOS Messages badge icon

This happens to me periodically, both on iOS and macOS. Lasts through restarts, eventually goes away all on its own. Read all the way to the end (it’s short) for the thing that solved this for Glenn. Tucking that away in my brain for the next time it happens.