Hey Kevin, thanks for the feedback (it actually sparked quite an interesting discussion internally)!
The short answer is you're correct that the Layout Instability API currently does not ignore elements that shifted but were not visible due to another element being positioned in front of them.
The API does *does* currently ignore elements that are not visible due to setting `display: none`, `visibility: hidden`, or `opacity: 0`. And I'd recommend you use one of those properties to avoid layout shifts in cases where you need to run layout on some elements before you make them visible to the user.
In terms of future changes to the API, we're going to look into whether it would be possible (without degrading performance) to determine that an element is not visible to the user due to stacking order, but it's not clear whether or not that will be possible.
If we are able to make that change, we'll announce it on the metric
CHANGELOG.