That bug is inherent to how terminal scrollback works and can’t be fixed as long as you use it. Your only choice is that jump or stale backscroll. Or you use Pi new fullscreen mode which gives up on terminal and use alternate screens and implement own scrolling without terminal scrollback.
How do I know? I implemented my own terminal harness and faced the same issue.