Sometimes I get that too, you can try sorting by unread and then go through the various tabs. Or press the "mark all as read" button and hope it goes away
Make sure to click on "show all" button (or equivalent button of your app) once in the messages tab. Once visible, mark them as read so they won’t remain as "active" unread message.
I had this behavior with my app that was considering the messages read (so hidding them by default when going to the messages tab) once i opened it while not marking it read on lemmy side (hence the 7 unread messages displayed)