RequestReviewAction + NavigationLink

Problem

I am using the environment var RequestReviewAction in my App whenever possible:

@Environment(\.requestReview) var requestReview: RequestReviewAction
self.requestReview.callAsFunction()

I noticed that in views presented via NavigationLink the prompt is not shown for some strange reason. However if I instead use SKStoreReviewController, the Review prompts are shown...

SKStoreReviewController.requestReview(in: scene)

Has anyone else encountered this issue?

Example

import StoreKit

struct PrimaryView: View {
    @Environment(\.requestReview) private var requestReview: RequestReviewAction
    
    var body: some View {
        NavigationStack() {
            VStack() {
                Text("Primary")
                NavigationLink(destination: DetailView()) {
                    Text("Show detail")
                }
            }
        }
        .task() { self.requestReview.callAsFunction() } // This works
    }
}

struct DetailView: View {
    @Environment(\.requestReview) private var requestReview: RequestReviewAction
    
    var body: some View {
        Text("Secondary")
            .task() { self.requestReview.callAsFunction() } // This does not work
    }
}

Note: I am pretty certain you cannot have two prompts in the same session so you should comment out the .task on PrimaryView

To clarify, the following will work in DetailView...

.task { guard let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene else { return } SKStoreReviewController.requestReview(in: scene) }
RequestReviewAction + NavigationLink
 
 
Q