I'm using sveltekit and arcgis js api v4.30. The legend is flickering whenever a new layer is added (see gif below). This wasn't an issue in v4.28.
Any ideas on how to fix this?

Below is a repository with an example of the issue.
To test: clone that repo, run "npm install", run "npm run dev", open http://localhost:5173/ in your browser, click the "Add Layer" button several times to see the flicker.
https://github.com/cschwinderg/svelte-legend-flicker