Indeed! Also, it won’t be just two or three lines, but several (depending on how many years the chart shows). So a legend element for all V-lines would be very helpful.
I’m not sure how the annotations are handeled under the hood. I’m pretty sure they are not traces, so you can’t group them with legendgroup
I would actually create scatter traces (lines) with a range of y.min() to y.max(), style them, group them with legendgroups. If you don’t want to see all the traces (vlines) you couls set showlegend=False to all but one trace.
I must confess, I did not try that, but that is what I would try.