Describe the bug
With experimental.async, when an update runs while an earlier batch is still pending, Svelte shows it the values from before the pending batch's writes. That works for $state, but not for the contents of a SvelteMap: a derived re-run in the later batch sees the pending batch's entries, changed values and size.
SvelteMap keeps its entries in the underlying Map and only version counters in sources. Batch#activate undoes other batches' writes to those counters, but values(), get() and size then read super, which already holds the pending batch's data. So the later batch computes from data it isn't supposed to see yet, and commits that to the DOM.
A $state object has the same problem for added keys only: ownKeys reads Reflect.ownKeys(target) and source.v, so the key shows up while its value reads undefined (related: #18943, which is the fork direction of the same reads).
In an app this showed up as a keyed {#each} over map.values(): an unrelated update re-ran the rows' deriveds while a batch that added an entry was pending, the list got the new entry's shape, and a row's derived read undefined.
Reproduction
App.svelte (Vite + @sveltejs/vite-plugin-svelte with ):