Clicking folder marks everything as read

Within the past couple of weeks it seems that when I click on a folder with unread messages (in particular the ones with new unread messages marked as red), it immediately removes any marking on the folder even though it still contains unread messages. I’ve tried a repair and removing and re-adding the account. Removing and re-adding will work temporarily and then it starts happening again. It’s very annoying because I can no longer tell where I have unread messages.

This is a Gmail account and only seems to happen on one of my gmail accounts (I have multiples).

Hoping someone has come across this and has a solution.