Messages marked as unread after replying from notification on Mac
I use iMessage on several devices, and when I receive a message on my MacBook and reply via the notification, the iMessage icon is still showing the red notification badge indicating that there's an unread message. Same goes for my other devices, where the messages I've quick replied to from my MacBook are all marked as unread. If, on the other hand, I open the Messages app from my MacBook and reply from within the app, the messages are correctly marked as read. This means that if I'm working with my laptop and talking to a friend with Messages without ever opening the app, in the end my iPhone will show tens of notifications on the app icon badge, although they're all messages I've already replied to.
Is there a way to fix this?
MacBook Pro 15", macOS 10.15