Pause/resume rendering for state change?

Hi. I’m using grafana scenes very heavily with dynamic layout changes.
I constanly hide and show multiple panels for lots of situations.
The problem is that, when I hide and show multiple panel at once in a single function, the layout flickers a bit, rather than showing the whole rendered layout at once.

So I was wondering, is there some way to disable re-rendering and resume it?
Thinking of something like this

function changeUI(){
  layout.disable_render();

  childlayout1.setState({ isHidden: false });
  childlayout2.setState({ direction: 'row' });
  childlayout2.state.children[0].setState({ isHidden: true });
  childLayout2.state.children[1].setState({ width: '50%' });

  layout.resume_render();
}