The 'async' in the accepted answer did it for me. I changed from context.performAndWait({ delete action }) to await context.perform({ delete action }). and this fixed it for me.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: