That is a horrible and dangerous reaction that does not solve the problem whatsoever. You are typing this comment with your heart, not with your brain.
If all cars were mandated by law to not accelerate when a person is in front of them, doesn't that give carjackers pretty much guaranteed success to confront and forcibly stop their victim before stealing their car, their belongings, or taking their life?
Why would I even bother buying a nice car if I know someone can just walk up in front of its front grill and hold me at gunpoint, and my car can't help but force me to stay there?
That woman would be raped and murdered in the middle of nowhere if her car disallowed her from making an executive decision for her safety.
Your idea is bad.