An Apple UICollectionViewLayout subclass vs a custom one. Notice the header visual effect view's glass is "synchronized" with the navigation bar, making them switch appearance together. No way there is a UIGlassContainerEffect in there somewhere.
View hierarchy inspector doesn't reveal much. The two hierarchies are the same, but notice the header view is positioned under the scroll pocket in the custom layout "for some reason".

Turns out there is a host of new, private, "interactions", one of which is _UIScrollPocketContainerInteraction, which manages the view's trait environment so that is adjusts child visual effects (using another "interaction").

What if you wanted the same behavior in your code?

If you create an _UIScrollPocketContainerInteraction instance and add it to the view, it actually works. But it creates an amusing effect where all glass effects are synchronized.

So to enable and disable the effect, in my case, I need to track which header is pinned to the top, and call _setActive: on the interactions of the header views to only enable for the top one. I extended UICollectionViewLayoutAttributes with a fields for this.

And it works.

Why is this private? 🙄🤡

So much of the glass is private voodoo, it feels like the heydays of iOS 7 blurs.