Any idea how to fix this Liquid Glass visual bug?

In my app, I have a #SwiftUI Menu that presents an overlay over the whole view. But the Menu stays visible for a short period of time until it goes below the overlay 🫤

Works fine on iOS 17/18.

Code: https://gist.github.com/alpennec/31e2ca4ce0980986afff0884afd7f477

Feedback: FB22453803

#iOSDev

The solution is to use .compositingGroup() on the #SwiftUI Menu 🎉

Thanks to Sascha (on BlueSky) who pointed me to a StackOverflow answer about the exact same issue: https://stackoverflow.com/a/79884587

Documentation about compositingGroup: https://shorturl.at/btdM6