I haven't tried to duplicate this with vi in anything other than iTerm2
Build 3.1.7 (but it has been happening for as long as I can remember)
If I have some output in a terminal window that I need to copy-n-paste to something else, I need to remember to do that before I invoke vi in the same terminal window.
This is all on my mac, not telnet/ssh to anything else.
If I invoke vi, do my edit/whatever, exit from vi, and then scroll back to try to copy-n-paste the output from the thing I ran before vi, a section of the output from that earlier command will have been overwritten by some of the vi session.