Ok this is trickier than I thought, it does happen is Safari as well, for example on this page: https://daringfireball.net/2021/10/the_tragedy_of_safari_15_quote_unquote_tabs. It only happens while images are displayed on screen, as soon as the images are scrolled out of view it stops happening. It happens very consistently. I can't see the page changing size so it's probably unrelated to that.
Checked both Firefox and Chrome again, neither of them have this issue, so maybe a WebKit issue?