ERROR: (px.scatter + marginal_y + categoryorder) crashes

Dear community,

it seems that setting the categoryorder of the x-axes makes px.scatter figures crash when using marginal plots:

import pandas as pd
import as px # plotly 4.9.0

df = pd.DataFrame({'x':['c', 'a', 'b'], 'y':[1,2,1]})
fig = px.scatter(df, x='x', y='y', marginal_y='box')
fig.update_xaxes(categoryorder='category ascending') # Line x'browser')
# Only works, if line x is removed, or when parameter marginal_y='box' is removed

Is this a bug or am I using the function the wrong way?