You are wise to be worried about this. It's the first lesson every SR GM has to learn.
1. One big tactic that can drastically cut down on fatalities is having security guards use gel rounds, sleep spells, and the like. There is even an SR world reason for this. Many of the lesser secured and less expensive sites are known to be less lethal and gung ho about putting runners into body bags. On the flip side, as the runners take on tougher targets, lethaltiy becomes more common. There are also Megacorps notorious for wanting to kill people and being vicious. MCT is probaly the worst. And of course the Azzies.
But lots of the runs starting out shadowrunners should be doing are against forces using non lethal means.
2. Challenge or stop the runners with non combat means. I was just part of a ridiculous mission failure and near TPK due to some nurses closing some maglock doors, us not being able to open the doors in time before the cops arrive, then having to flee in the nick of time. Yes, we were beat by nurses. But really we were beat by some of our team rejecting workable plans, then insisting we boot and shoot. And some bad rolls on my part trying to open the damned doors (The big failure with all boot and shoot plans is that if the GM is thinking, then you just did the equivalent of calling the cops at the start of your run)
3. Guards should be more dangerous in that they will call the police or responding security forces, than that they will kill you. Exceptions to this would be elite guards of elite sites like red hot R&D labs. Or the infamous cyberzombies guarding the executives.
4. Take everyone's heavy weapons away before the big fight. For example stage it in a nightclub, where the guards have taken everyone's heavier weapons away. Weapons scanners and patdowns at the door. If you get a chance, look at how Fallout New Vegas does similar with the casinos. There's missions you out right have to rely on ..22 pistols, fists, knives, or whatever weapon you can steal inside the casinos.