Welcome to our forum & thanks for the question!
You're right - the state of the legend is not persisted throughout exports - the chart is being exported in its most recent state, but it does not include user interactions like hover, click, etc.
If you'd like to export a chart with a different config than the one applied to the chart shown on the screen, you could implement your custom logic which would pin into the exportChart
method or update the chart right before this method gets called.
Here's a simple demo: https://jsfiddle.net/zfg6bo9m/
Please do not hesitate to ask in case you have any more questions.