This is such a stupid trope in sci fi, done just to create a half ass sense of danger and suspense to a scene that’s basically just the character playing a bloody video game. At least some stories try to explain it as actually being a risk of heart attack or aneurysm caused by extreme stress, while other lazier story just straight up have the characters spontaneously suffer the exact same injuries they get in game, “because the awesome power of the mind makes it real” or some silly crap like that..