This happens when the terminal is in ‘Alternative Screen Mode’. The problem might also be combined with characters looking like
What is Alternative Screen Mode?
Many user-interactive terminal application such as vi, screen and htop use ‘alternative screens’ which acts as a buffer of terminal content which is different to the ‘main’ screen. This means that once the application is terminated, the alternative screen closes and returns to the normal screen making it look like the application didn’t output anything.
How to Fix
Click View > Hide Alternative Screen. The shortcut for this is ⇧⌘↑.