With Firefox?
Does a simple reload work around the issue?
If so, you might find the issue avoidable (with Firefox) by reloading a page before leaving it.
I often find that previously viewed content – sometimes, multiple posts within a topic – is missing until after a reload of the page.
Defocusing from FreeBSD Forums: this type of behaviour was very noticeable, in the past, with GitHub and with Bugzilla for Mozilla.
I haven't noticed the behaviour recently with GitHub. Either the service is improved, or I have become blind to the issue (maybe instinctively keying Control-R without thinking about it).
I'm 99% certain that Bugzilla for Mozilla no longer presents this behaviour; that improvements were made at or around the same time as the site gaining the shallow blue banner when visiting a bug page where comments had been added since the previous view.