LazyVStack - pinnedView unexpected behavior

I found an unexpected behavior with the pinnedViews (header, footer) in LazyVStack. When you have a LazyVStack with buttons and scroll through it, you can sometimes click the button even it's behind a pinned view.
When you have a VStack with a View and a LazyVStack and scroll though the list, sometimes the buttons will trigger even through the top view above the LazyVStack.

Example Code -> Scroll the List and click e.g. in the Top Area or Header. Sometimes the button is triggered. Especially if the list scrolls slow and sometimes even without scrolling.

Code Block swift
struct Test3: View {
var headerView: some View {
ZStack{
Rectangle()
.opacity(0.8)
Text("Header")
.foregroundColor(.orange)
}.frame(height: 50)
}
var footerView: some View {
ZStack{
Rectangle()
.opacity(0.8)
Text("Footer")
.foregroundColor(.orange)
}.frame(height: 50)
}
var body: some View {
VStack{
ZStack{
Rectangle()
.opacity(0.9)
Text("Top Area")
.foregroundColor(.orange)
}
.frame(height: 40)
ScrollView {
LazyVStack(alignment: .center, spacing: 10, pinnedViews: [.sectionHeaders, .sectionFooters], content: {
ForEach(1...4, id: \.self) { section in
Section(header: headerView, footer: footerView) {
ForEach(1..<121) { item in
Button(action: {
print("action")
},
label: {
ZStack{
Rectangle()
.frame(height: 34)
Text("Section: \(section), Item: \(item)")
.foregroundColor(.orange)
}
.padding(.horizontal, 20)
})
}
}
}
})
}
}
}
}


LazyVStack - pinnedView unexpected behavior
 
 
Q