swiftui stuck when navigation bar changed

In Swiftui, when I jump from a page containing Navigationbar to a hidden page in Navigationbar, then swipe back, and then click on the jump button, the page will freeze and not respond.I used Iphone14 promax ,ios17.2.1,It's normal on iOS 16 Here is my test code

struct TestVew : View {
    var body: some View {
        NavigationView {
            ZStack{
                NavigationLink {
                    SecondView()
                } label: {
                    Text("To SecondView")
                }

            }
            .navigationTitle("First page")
        }
    }
}

struct SecondView : View {
    var body: some View {
        VStack{
            Text("SecondView")
        }
        .navigationBarHidden(true)
    }
}

extension UINavigationController: UIGestureRecognizerDelegate {
    override open func viewDidLoad() {
        super.viewDidLoad()
        interactivePopGestureRecognizer?.delegate = self
    }

    public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
        return viewControllers.count > 1
    }
}

I am a beginner and I need help. Thank you

swiftui stuck when navigation bar changed
 
 
Q