Created attachment 435602 [details] Testcase hi is displayed twice with the testcase.
<rdar://problem/81980863>
Created attachment 435603 [details] Test reduction
Created attachment 435604 [details] Test reduction
This looks to be timing related too. If you can't repro, try locally (or change the timeout).
We fail to repaint the old content area when the block shrinks vertically as a result of a layout. Legacy handles this by invalidating deleted line boxes. In many real world cases the content below moves, triggering repaint and hiding the issue.
Created attachment 435671 [details] patch
Committed r281136 (240590@main): <https://commits.webkit.org/240590@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 435671 [details].