V_line annotations in for loop returns TypeError

I have a plot where I wish to add v_lines at given intervals. The plot work as expected without annotations, but when I try to add annotations to the lines I get this error:

TypeError: Addition/subtraction of integers and integer-arrays with Timestamp is no longer supported. Instead of adding/subtracting n, use n * obj.freq`

I dont understand what the annotations have to do with timestamps.
This is my code:

import plotly.express as px
import pandas as pd

rng = pd.date_range('2015-02-24', periods=20*12, freq='M')
df = pd.DataFrame({ 'year': rng, 'Val' : np.random.randn(len(rng))}) 

fig = px.line(df, x="year", y="Val")

highlight_years = pd.date_range(df.year[0], periods=5, freq="5Y")

for y in highlight_years:
    fig.add_vline(x=y, 
                  line={"color":"red", 
                        "width":2,},
                  annotation={"text":f"year: {y}","position":"top right"},
                 )

fig.show()

Notice how it works as expected if you comment out line 14 (annotation).