isPressed is not reliable when Button is inside ScrollView

I opened a feedback ticket (FB16508762) but maybe someone in the community already found a workaround while the feedback reaches the maintainers.

When I put a Button inside a ScrollView, the tap animation stops working reliably and works only when the user taps and holds the button for a short time. The reasons, I believe is related to the fact that isPressed of configuration does not change and the default button styles use it to animate the tap.

import SwiftUI

struct DebuggingButtonStyle: ButtonStyle {
    func makeBody(configuration: Configuration) -> some View {
        configuration.label
            .onChange(of: configuration.isPressed, { oldValue, newValue in
                print("Is pressed: \(oldValue) -> \(newValue)")
            })
    }
}

struct ContentView: View {
    var body: some View {
        VStack {
            Text("Buttons inside scroll view respond to taps as expected, however isPessed value of the configuration do not change unless the user press and hold it. Try to press the promiment button quickly or use the debug button and observe the console log.")
            
            ScrollView {
                VStack {
                    Button("Button Inside ScrollView") {
                        print("Button tapped")
                    }
                    .buttonStyle(.borderedProminent)

                    Button("Button Inside ScrollView (printing isPressed)") {
                        print("Button tapped")
                    }
                    .buttonStyle(DebuggingButtonStyle())
                }
            }
            .border(FillShapeStyle(), width: 2)
            
            Spacer()
            
            Text("For reference, here is a button outside of a ScrollView. Tap the promiment button to observe how the button is expected to animate in respnse to a press.")
            VStack {
                Button("Button Outside ScrollView") {
                    print("Button tapped")
                }
                .buttonStyle(.borderedProminent)

                Button("Button Outside ScrollView (printing isPressed)") {
                    print("Button tapped")
                }
                .buttonStyle(DebuggingButtonStyle())
            }
        }
        .padding()
    }
}
isPressed is not reliable when Button is inside ScrollView
 
 
Q