A possible trigger is recipes.removeAll() before the ModelActor call. While the fetch is suspended, the selected row vanishes from List(selection:); NavigationSplitView may then restore a stale selection when rows return. Try keeping the old rows visible, build the fetched results locally, and assign the array once on the main actor. Also check that row values use stable, unique IDs matching the selection type.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: