The legend of the graph does not change

i use bokeh 3.0.0

When using version 2.4.2 the legend was updated in the callback function whenever there was a callback.
However, there was an error when changing the legend while updating to 3.0.0, so I changed it using setattr. The legend does not change when a callback occurs in the graph.
스크린샷 2022-11-01 오후 2.06.59

@tp7019 it is impossible to speculate unless you provide a complete Minimal Reproducible Example that we can actually run and investigate directly.