Update figure with Patch and keep UI state

Hello everyone,

I am trying to add the uirevision to this Theme Explorer example.

The UI state is correctly preserved when I disable the second callback and I add the uirevision on both plots in the first callback:

fig.update_layout(uirevision='constant')
fig_scatter.update_layout(uirevision='constant')

Nevertheless, when I also use the second callback in combination, to speed-up the figures theme update using Patch(), the UI state, such as the zoom, is not preserved anymore.

Any suggestion to solve this issue?