position: sticky works only in context of the "containing block" - i.e. immediate block ancestor, the nearest ancestor that is a block element
it does not work in context of NOT immediate containers
even if you make the immediate container not a "scroll container" by specifying "overflow: visible", CSS still considers it the scroll container and the element won't stick to the outer div that is a scroll container
specification can be more clear https://www.w3.org/TR/css-position-3, if i understand it correctly