Autorange cuts off y axis

Hello,

I was creating a test plot and ran into an issue while using autorange = False; the top portion of the y axis is always cut off.

I used the following code:

import plotly.graph_objects as go

apples = ["apples", "apples", "apples", None, "apples", "apples", None]
bananas = [None, None, None, None, None, None, None]
pears = ["pears","pears", "pears", "pears", "pears", "pears", None]
oranges = ["oranges","oranges", "oranges",  None, "oranges", "oranges", None ]
grapes = [None, None, None, "grapes", "grapes", "grapes", None]

x = [1,2,3,4,5,6,7]

fig = go.Figure()
fig.add_trace(
        go.Scatter(x=x, y=apples,showlegend=False))
fig.add_trace(
        go.Scatter(x=x, y=bananas,showlegend=False))
fig.add_trace(
        go.Scatter(x=x, y=pears,showlegend=False))
fig.add_trace(
        go.Scatter(x=x, y=oranges,showlegend=False))
fig.add_trace(
        go.Scatter(x=x, y=grapes,showlegend=False))


fig.update_xaxes(showline=True, linecolor='black')
fig.update_yaxes(automargin=True, title_text="Fruits", type='category', categoryorder='array', categoryarray= ['apples','bananas','pears','oranges', 'grapes'], autorange = False, showline=True, linecolor='black')
fig.show()

Which produced:

The top tick is always cut off unless I set autorange = True, which is not what I want to do, as it does not maintain the desired order of axis ticks that I set previously. Is there a way to fix this?

Thanks!