SCNSceneRenderer hitTest finds hit only once

My SwiftUI app renders a SCNScene with the code below. The scene displays visible nodes that can be tapped to show an info.
When a tap to a node ends, hitTest of the renderer (saved in the viewModel) is called. It returns the tapped node and sets isShowingVehicleInfo so that the MainView shows the VehicleInfoView above the Board3DView.

This works, but only the 1st time.
When the same node is tapped a 2nd time, hitTest no longer finds the node.
If however, another mode is tapped, hitTest finds the other node, but also only once.

I have a slightly modified code that behaves correctly, i.e. finds nodes always.
Instead of using ZStack to display the node info, it uses a sheet.

I prefer the ZStack version, because it allows me to control the info size, whereas the sheet version always presents a full size info.

I don’t understand why the ZStack version has this strange behavior to find a node only once.
Any help is welcome!

First code using ZStack that finds a node only once:

struct MainView: View {
    @State private var isShowingVehicleInfo = false
    // …

    var body: some View {
        NavigationStack { // Required for a toolbar in iOS
            VStack {
                TitleAndToolbarView(isShowingVehicleTypeInfo: $isShowingVehicleTypeInfo, 
                                    isShowingVehicleInfo: $isShowingVehicleInfo, 
                                    viewModel: viewModel)
                .padding(.top)
                
                ZStack {
                    GeometryReader { geometry in
                        Board3DView(viewModel: viewModel)
                            .onChange(of: geometry.size) {
                                viewModel.setMainViewSize(geometry.size)
                            }
                            .onChange(of: viewModel.selectedVehicle, {
                                if viewModel.selectedVehicle != nil {
                                    isShowingVehicleInfo = true
                                }
                            })
                            .edgesIgnoringSafeArea(.all)
                    } // geo reader
                    .padding(.top)
                    
                    if isShowingVehicleInfo {
                        VehicleInfoView(isShowingVehicleInfo: $isShowingVehicleInfo, 
                                        isShowingCameraFullScale: $isShowingCameraFullScale, 
                                        viewModel: viewModel)
                        .background(.white)
                    }
                }
            }
        }
    }
}

struct Board3DView: View {
    // …

    var body: some View {
        
        // Define a spacial tap gesture
        let tapGesture: _EndedGesture<SpatialTapGesture> = SpatialTapGesture(count: 1)
            .onEnded() { event in
                // hit test
                guard let renderer = viewModel.renderer else { return }
                let hits = renderer.hitTest(event.location, options: [SCNHitTestOption.categoryBitMask: ~NodeType.cannotBeTapped.rawValue])
                if let firstHitResult = hits.first {
                    // Here, isShowingVehicleInfo is set in the MainView
                }
            }

        ZStack {
            Color.black.edgesIgnoringSafeArea(.all)
            
            SceneView (
                scene: viewModel.scene,
                options: [], // .allowsCameraControl is disabled
                delegate: viewModel
            )
            .simultaneousGesture( tapGesture )
            // …
        }
    }
}

Second code using sheet that finds the node always:

var body: some View {
    NavigationStack { // Required for a toolbar in iOS
        VStack {
            TitleAndToolbarView(isShowingVehicleTypeInfo: $isShowingVehicleTypeInfo, 
                                isShowingVehicleInfo: $isShowingVehicleInfo, 
                                viewModel: viewModel)
            .padding(.top)
            
            GeometryReader { geometry in
                Board3DView(viewModel: viewModel)
                    .onChange(of: geometry.size) {
                        viewModel.setMainViewSize(geometry.size)
                    }
                    .onChange(of: viewModel.selectedVehicle, {
                        if viewModel.selectedVehicle != nil {
                            isShowingVehicleInfo = true
                        }
                    })
                    .edgesIgnoringSafeArea(.all)
            } // geo reader
            .padding(.top)
            .sheet(isPresented: $isShowingVehicleInfo, onDismiss: {
                viewModel.deselectVehicle()
                isShowingVehicleInfo = false
            }) {
                VehicleInfoView(isShowingVehicleInfo: $isShowingVehicleInfo, 
                                isShowingCameraFullScale: $isShowingCameraFullScale, 
                                viewModel: viewModel)
            }
        }
    }
}

}

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật