How to add categorical color legend for scatter plot created by graph_objects

Do you know why fig.update_layout(legend_itemsizing ='trace') does not work as expected?

import plotly.graph_objects as go

fig = go.Figure()
for x, y, size in zip(['Elephant','Lion', 'Tiger', 'Dolphin'], [10, 11, 12, 13], [40, 60, 80, 100]):
    fig.add_trace(
            go.Scatter(
            x=[x],
            y=[y],
            name=x,
            mode='markers',
            marker=dict(size=size)
        )
    )

fig.update_xaxes(tickfont=dict(size=20))

fig.update_layout(legend_itemsizing ='trace')

fig.show()