Fig.add_vrect not rendering in st.plotly_chart()

The following code used in plotly chart is rendering as a horizontal line on the x-axis when called using st.plotly_chart:

fig.add_vrect(
x0=pStart, x1=pEnd,
fillcolor="Green", opacity=0.25,
layer="above", line_width=1)

Is there a way to resolve this issue?
Thanks in advance.

A closer look reveals that the vertical rectangle does render but only till y=1. The same figure however, renders perfectly outside st.plotly_chart().