fix: properly cleanup layout on component rerender
This caused an issue of multiple workers/gl contexts piling up, and slowing down the layouting significantly after a few re-renders (or machine learning toggles).
This caused an issue of multiple workers/gl contexts piling up, and slowing down the layouting significantly after a few re-renders (or machine learning toggles).