I think it is related to this commit as it was okay before AFAIR:
https://github.com/discourse/discourse/commit/74a454c203a97468ee7d6772d107d9d0b9b341a1
It’s not always happening because of the length of posts. I don’t know when Discourse is fetching the next batch of posts but when a long post is the last loaded one, then it may be too far down to trigger the load since the commit moved the current visible/selected post down a lot.