These two things are noble ideas but will usually fall short in terms of YOUR own protection.
Let's start with "shelter in place".
The premise here is that the risk of flight is greater than the risk of barricading yourself someplace and hoping help arrives before the bad guy finds you.
In a school, where minor children are present, this is perhaps a viable option. Until the event unfolds, it's impossible to say how effective this might be (or actually was).
What we really want to focus on is how it might impact YOUR safety should you find yourself the victim of an attack.
Once you decide to shelter in place, no matter what the reason, you are electing to remain in a fixed location and WAIT. But what are you waiting for? By waiting, you are potentially betting your life that the threat ends before the bad guy can get to you.
Unless the room you choose has masonry walls and a steel door that opens to the INSIDE of the room, your hiding place is a death trap. Modern building construction is drywall and wooden doors. You can kick your way thru a sheet of drywall in seconds. Neither the wall nor the door offers any protection from gun fire. If the door opens to the outside, then all the bad guy has to do is take the pins out of the hinges and move the door out of the way.
Regardless, you're trapped in a room hoping that you don't get killed. Maybe you'll fight back if you have the chance. But by then, it'll be too late. You'll be a target in a shooting gallery.
Obviously, this is not a choice that we would recommend unless it was the ONLY option. Again, that's something that you and only you can decide and you'll have to do it in the heat of the moment.
Now let's talk "gun free zones".
We are, in general, a law abiding society. So, if the law says we can't have a gun in a certain place, we're unlikely to break that law. The bad guy, on the other hand, doesn't care about the law. If he did, he wouldn't be a bad guy. By creating a gun free zone, we have allowed a group of law abiding people to gather without the ability to use a firearm for self defense.
From the bad guys perspective, this is awesome. He can attack and kill with little risk of facing an armed opponent. When was the last time there was a mass shooting at a gun range?
Maybe you decide to be less than law abiding and bring your handgun into a gun free zone. If you're caught, you may be charged with a crime and lose your ability to carry (or even possess) a handgun in the future. Is it really worth the risk? Better yet, why even consider being in that gun free zone? After all, it was your choice to be there and abide by the rules.
There are times we don't have a choice because we are compelled to be where our handguns are not allowed (court houses, etc.). There are other times we accept the risk for the "greater good". An example of this would be where you work. Most likely guns are prohibited by your employer. You know this, you abide by it and you accept the risk because you need the job.
In order to maximize your chances of surviving an encounter with an armed bad guy, you should find cover and protect yourself with your handgun. Notice we didn't say "go seek him out and enter into combat with him". That is certainly an option, but it doesn't maximize your safety. The decision to go after the bad guy is one that you'll have to make in the heat of the moment.
In this discussion we've really been focused on a "mass shooting" or "active shooter" situation.
The reality is that we are more likely to get hit by lightning than to find ourselves in this situation. That doesn't mean we don't want to be prepared and to understand how our choices might come back to haunt us. At the same time, we shouldn't be paranoid or lose sleep thinking about what might happen.
For most of us, the bad guy will be an intruder in our home or someone we encounter out in public. Seeking cover may not be an option (especially out in public). This is where we must act (NOT REACT) quickly and decisively. We will have a matter of seconds to assess the situation, form a solution and act upon it. It might mean to scream, drop your purse and run like hell. It might mean to draw your handgun. Once you've drawn it, you will then have to decide when to fire (or if you need to fire at all). Do NOT draw your handgun unless YOU ARE WILLING AND CAPABLE of pulling the trigger!!!!
In closing, the only person you can depend upon for protection is you. The choices you make will determine how successful you might be.