Steps to reproduce:
Bug is reproducible on the demo.
FYI: Tried to fix it but couldn't fix it within 4 hours. Pushed the changes here but there are a few challenges see comment: https://github.com/matomo-org/matomo/commit/7253a4fdbf2eda90130ba47e119117b07ac8679a
I reckon to fix this, we would actually need to reload the popover with some additional parameters eg which period to select, which metrics to preselect. I reckon fixing this will take another 8 hours as you need to put a lot of "hacks" into various visualisations to make this work.
A problem is really that it not only remembers which metrics are selected, but it even shows metrics below the graph that aren't available for that period etc.