SwiftUI equivalent of isMovingFromParentViewController

Hello, I am looking for a way to tell if a view is disappearing due to being dismissed by the back button. I have found a lot of answers that seem to use UIKit's isMovingFromParentViewController, but I am using Swift UI. So, I was curious if there is some way for SwiftUI's onDisappear function to do the same thing. Thanks.

Maybe you should try the ˋisPresentedˋ environment value.