Whoa... that's definitely not supposed to happen. My first random guess would be that some of your RAM's gone bad; if you're not using some Firefox derivative for web browsing, then VSCode might just be the only thing that's stressing the memory enough to cause the crash. But that's not an expected result just from stressing the system's resources (at least certainly not to that modest extent).
If it were me I might run a memory tester and see what it said. I have no real idea if that's the issue or not, but that's a thing I would try.