I had the same problem and this worked for me.
/// - Experiment:
try await Task.sleep(for: .milliseconds(100))
DispatchQueue.main.async {
modelContext.insert(location)
try? modelContext.save()
}
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: