the top panel is acting strange

When you press the button on the top panel, only the first item is always selected. I have attached a video with an explanation. Why does this happen? I have not noticed this in other applications