I tested same-origin navigation between two documents. Each destination document starts with an empty , then sets its visible content via a setTimeout in js.
I have prepared a simple repro. The attached files are two static HTML pages. Each page starts with <body></body>. After DOMContentLoaded, each page schedules setTimeout(..., 0) and then replaces body.innerHTML with a full-page colored link to the other page.
Attached is also a screen recording of the issue with a side by side Chromium and Firefox comparison