It's not visibility, it's focus (at least on desktop). If you don't click a messenger box, it will display the message but not acknowledge it as read (on the desktop client, on mobile it works based on whether the message is displayed while the app is open).