Re-render every diagram from scratch, ignoring the cache, after a theme change, say, and resolve once every render has settled (which also makes it the way tests wait for asynchronous renderers).
Hide previews without tearing down; re-enabling restores them from cache.
Remove every preview and stop listening to the editor.