Autonomous weapons don't decide whether or not to kill someone based on subjective moral criteria. They're dumb. They don't discriminate. They're essentially just working on a model that looks like "kill any human within this virtual fence". Building in features that try to be clever is unnecessary and complicated. You just need a sign that says "Don't go in here."