When you press ALT while your VSCode intergrated terminal is open, it sometimes fills the terminal with
Github user meganrogge notes that you can fix this by configuring a setting on VSCode.
Specifically, you want to go to VSCode settings and uncheck/disable the Alt Click Moves Cursor setting.
You can search
altclickmoves and it should show up under Features > Terminal. Just make sure it’s unchecked.