In my case, position: sticky elements failing to stick is due to having height: -webkit-fill-available in any of the element's ancestors.
position: sticky
height: -webkit-fill-available