I am facing the same issue as well. fetch crashes, but on the same FetchDescriptor fetchCount return correct result. To be more specific. I have a @ModelActor in which I am making some fetch and insert calls. This modelActor is initialized with modelContainer from the @Environment modelContext on .onAppear, and then calls to insert are made. After insertion is done, fetch call is made.
The @ModelActor is a singleton to maintain a single modelContext across the app. And I am also initializing the .modelContainer as a @State instead of a let.
The app works on iOS 17, but crashes just like OP mentioned on iOS 18.
I've checked the SwiftData forum posts but no solution, is there anything anyone from the Apple Dev Team can point to regarding this?