You really need to get a diagnosis before we can really help.
Because the remedy will differ depending on what the cause is.
It could be a failing passkey sensor, or the BCM itself.
One will require you to replace the ignition switch, which is not too easy for a DIY job, I'll give you a link to look at to see what you'd need to do if it was the ignition switch.
Your key does not have a visible pellet it it right?
I ask because I am pretty sure you have Passkey 3 and not Passkey 2.
Sparky'* Answers: 2003 Chevrolet Impala Security Light Flashes and The Engine Will Not Run
Sparky'* Answers: 2003 Chevrolet Impala Ignition Lock Cylinder Replacement
If it is the BCM then they would be easier to replace, but they are not cheap, and they need to be reprogrammed once installed, and in your case you'll most likely need the dealer to do it.
The thing I do not understand is you mentioned the car shut off while running, I guess that could have been from the faulty MAF, but the theft deterrent signal issue will not shut the car off while running, but it will prevent it from starting once shut off.
If it is diagnosed as a bad BCM, I think you can have somebody that tunes PCM'* tune VATS out of the system, that would be cheaper than replacing the BCM, you'd lose the security system though..