Dropdown in header clears when navigating

Hi all,
I have a dropdown in my header that I want to retain its selected value even while navigating through my site.
It works as intended in preview mode, but on my published site it clears itself every time I change pages.
Please help!

ps. my code is not the problem. I tested with a new dropdown element with zero modification or code and it does the same thing. I make a selection, click another page from the menu, and the value disappears. In preview mode, the value sticks.

Ok so I’ve discovered that it’s normal that the dropdown clears even as a header item and that the only solution is to put the value in storage and reassign it to the element.