Toolbar does not animate in with Swift UI NavigationStack

Hello, fairly new to Swift, I come from a React Native background. One of the hardest things I'm finding is simply customising the screen headers in the navigation. I've managed to do it using a custom modifier that uses .toolbar and ToolbarItem as shown below:

struct NavBar: ViewModifier {
    let title: String
    let showBackButton: Bool?
    @Environment(\.dismiss) private var dismiss


    func body(content: Content) -> some View {
        return content
            .toolbar {
                if showBackButton == true {
                    ToolbarItemGroup(placement: .navigationBarLeading) {
                        Button(action: {
                            dismiss()
                        }) {
                            Image("BackButton")
                        }.padding(.top, 18)
                    }
                }
                ToolbarItem(placement: .principal) {
                    Text(title)
                        .font(Font.custom("Knight Vision", size: 28))
                        .foregroundColor(.white).padding(.top, 20)
                }
            }
            .navigationBarBackButtonHidden(true)
    }
}

This is all fine and suits my needs however I'm finding that the toolbar does not slide in with the rest of the screen when navigating to as screen with it on. I would expect the title to slide in with the other items on the screen. Especially since the toolbar does animate out, it just does not animate in.

Heres a video so you can see what I mean. Am I doing something wrong here? Is there a better way to do this?

[linkText](https://www.youtube.com/shorts/6M-glapBZz0 /)

Toolbar does not animate in with Swift UI NavigationStack
 
 
Q