I have a couple different SwiftUI modal sheets -- one presented in a HostingController from a UIViewController, another presented with .sheet from a SwiftUI view -- that dismiss the moment the app begins to enter the background. I've verified it's not a model issue (even when I set the isPresented variable to true and never modify it, it is still changed somehow to false). It seems to be something the system is doing when the application enters the background. Is this some sort of expected behavior, or how can I prevent it?
SwiftUI Modals Dismiss When Entering Background
This is exactly the situation I have. Have you found a workaround?