After waking up the computer, messages from hours ago stay unread until I click on each conversation to make the badge go away. Restarting Messages.app doesn’t fix that. Clicking on a conversation sometimes replays the messages with a “new message arrived” notification sound for each message.
iMessage stopped syncing my conversations’ unread status around the time I updated to Catalina. So I have to view each conversation on each device to clear the notification number.