SwiftUI NavigationLink unexpectly pops itself in very simple use case (iOS 15 only)

I just discovered that the following simple code snippet has a very confusing behavior on iOS 15.0-15.1.

When I go to the NavigationLink, the child page pops up unexpectly once the app goes into the background and reopens. This issue does not happen on iOS 14.

struct ContentView: View {

  var body: some View {
    NavigationView {
      TabView {
        NavigationLink {
          Text("👀 Go to background. This view will pop.")
        } label: {
          Text("Push")
        }
      }
    }
    .navigationViewStyle(.stack)
  }

}

You may have noticed that I have nested the TabView in the NavigationView, and this issue is related to this structure. Like many social apps such as Telegram and WeChat, I believe nesting TabView in NavigationView is a widely used structure. I am very hopeful that this issue will be resolved.

I may have asked the incorrect question. TabView should NOT be placed in NavigationView because each tab needs its own instance of NavigationView to maintain independent state. This is also true in UIKit.

So, the right question should be: how to implement the functionality provided by UIViewController.hidesBottomBarWhenPushed in SwiftUI?

SwiftUI NavigationLink unexpectly pops itself in very simple use case (iOS 15 only)
 
 
Q