This doesn’t seem like something a shell can implement properly. Well, except maybe you could make a shell+tmux hybrid, but that’s a terminal emulator running inside of a terminal emulator then (as are tmux and screen).
The problem is that when you run e.g. ls, it prints directly to the terminal. The shell could, once ls finishes, reposition the cursor to the top and then print over the ls output, but that’ll just overwrite part of the ls output and ruin the scrollback buffer, which would be annoying.
I think if you really wanted to implement this properly you’d need some sort of new feature (like an overlay layer maybe), implemented by the terminal, and then the shell would have to be patched to make use of that.
Since everyone keeps mentioning yt-dlp I gotta ask: what’s wrong with the original youtube-dl? I keep using it, it works, it’s still being updated.