I had the same issue. Whenever the state of the ParentView is updated by some published property it messed up the navigation to the ChildView.
E.g.
LibraryView which can open BookViews and also download new books. During the download, the state is constantly updated (progress bar going 0-100). So whenever a book was downloading (continuous state updates of LibraryView), the NavigationLink messed up the navigation to BookView in one of two ways:
popped the BookView from backstack immediately (like in https://developer.apple.com/forums/thread/677333) - this happened when I used just one NavigationLink and just changed its destination param depending on the current book.
Yelled "Unable to present. Please file a bug." and caused the BookView to not properly register for its state changes on @Published viewmodel properties (so it was always stuck in "loading" state). - this happened when the NavigationLinks have been created inside ForEach.
The solution I used was to delegate the navigation to the viewmodel and stop listening to state changes there (cancel the Combine Publisher). Something like this:
func navigateToBook(bookId: Int) {
destinationBook = BookView(viewModel: createBookViewModel(bookId: Int(bookId)))
cancellables.forEach { $0.cancel() }
isBookPresented = true
}
I honestly have no idea how to tie the lifecycle of viewModels to the lifecycle of SwiftUI views right now - NavigationLinks don't seem to be able to help, the onAppear / onDisappear are interleaved (i.e. the onAppear of ChildView will fire before onDisappear of ParentView).
It's a mess.