Thanks again, that part is (probably based on the screenshot) by design.
In practice, the next heading “takes over” when it has reached a specific threshold from the top, rather than as soon as previous one goes off screen.
There have been a number of different versions of this feature to date, and I think they all have some shortcomings in some situations.