Plus most videogames have a feature where if you screw up you get killed. That basic rule in nearly every game serves as a constant reminder that one cannot simply do this kind of thing for real, because in reality you can't respawn if you mess up and get shot.
Then again, not to overestimate the intelligence of some gamers, they may well think that "the game will go on", and not really contemplate the consequences of their actions. Remember, this is the same crowd where you get reports of people dying because they forgot to do things like eat, drink, and sleep.
Yeah but such happenings are a minority among people who play videogames. There are the casuals- people who enjoy a game once and a while but don't seriously play any particular game, the weekend warriors (Like me) who will sit down with a game on a weekend or a night with a few hours free and enjoy it in depth, and the hardcore gamers who other than playing their game do nothing else that they don't absolutely have to do.
For the most part such events and related phenomena such as videogame addicts only appear in the hardcore category, as other types tend to maintain enough of an attachment to reality to not be consumed by their game for more than a session's duration at a time.
Otherwise said games would have long been deemed hazardous to one's health in more severe ways than just the risks of sitting around too much enjoying them, and would have been either regulated like smokes or outright pulled from shelves.