Does Liquid Glass ignore regular hit testing in SwiftUI?

I’ve encountered an aspect of the Liquid Glass effect in SwiftUI that seems a bit odd: the Liquid Glass interaction appears to ignore regular hit-testing behavior.

The following sample shows a button with hit testing disabled:

@main
struct LiquidGlassHitTestDemo: App {
    var body: some Scene {
        WindowGroup {
            Button("Liquid") {
                fatalError("Never called.")
            }
            .buttonStyle(.glassProminent)
            .allowsHitTesting(false)
        }
    }
}

As expected, the button’s action is never called. However, the interactive glass effect still responds to touch events:

What’s even more surprising is that the UIKit equivalent behaves differently:

final class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()

        let button = UIButton(
            configuration: .prominentGlass(),
            primaryAction: UIAction(
                title: "Liquid",
                handler: { action in
                    print("Never called.")
                }
            )
        )

        view.addSubview(button)

        button.translatesAutoresizingMaskIntoConstraints = false
        NSLayoutConstraint.activate([
            button.centerXAnchor.constraint(equalTo: view.centerXAnchor),
            button.centerYAnchor.constraint(equalTo: view.centerYAnchor)
        ])

        button.isUserInteractionEnabled = false
    }
}

In this case, the effect is not interactive at all. Similarly, if a UIViewController’s root view overrides hitTest(_:with:) to always return nil, the Liquid Glass effect does not react to touch events whatsoever.

The only way I’ve found to “properly” disable the glass interactivity in SwiftUI is to use the .disabled(true) modifier. However, this also changes the button’s appearance, which is not always desirable.

Is this expected behavior, or could this be a bug? Am I missing something about how Liquid Glass interaction is implemented in SwiftUI?

Does Liquid Glass ignore regular hit testing in SwiftUI?
 
 
Q