Back button disappears when I have items in the toolbar

Hi,

When I navigate between views, sometimes the back button disappears after 1 sec. From what I can see, this happens when I have items in the toolbar. If I remove the toolbar, it works as it should.

Are my code below wrong, or is this a bug with iOS 14?

Code Block swift
.toolbar {
            ToolbarItem(placement: .primaryAction) {
                
                HStack(spacing: 40) {
                    
                    #if DEBUG && os(iOS)
                    Button(action: {
                        demodemo()
                    }) {
                        Label("Find artwork", systemImage: "scribble")
                            .labelStyle(IconOnlyLabelStyle())
                    }
                    #endif
                    
                    #if !os(watchOS) && !os(tvOS)
                    if let providerUrl = provider.url, let url = URL(string: providerUrl) {
                        Button(action: {
                            openURL(url)
                        }) {
                            Label("View \(provider.name) in Safari", systemImage: "safari")
                                .labelStyle(IconOnlyLabelStyle())
                        }
                        .accessibility(label: Text("View \(provider.name) in Safari"))
                    }
                    #endif
                }
            }
        }


If anyone else has the same problem, you can workaround the problem by setting this on the NavigationView:

Code Block swift
.navigationViewStyle(StackNavigationViewStyle())


Thank you @espen! I've been searching for a solution for this bug for a while now. Legend.
Back button disappears when I have items in the toolbar
 
 
Q