I'd definitely agree if audio was the only cue but it's not.
This is the primary way you're warned and it pops up every time, right at the very beginning of the process.
There are some limited examples where the AI process for this fails and I think that some work could go into the algorithm to make it a bit more lenient and elegant (it's a tad simplistic right now) but these issues do not represent more than a very low percentage of cases, in my experience. So long as you pay attention to the HUD elements telling you what's going on.
This is important. The HUD tells you this and whether the scan will end up negative, too. It's really important that you learn the HUD (it's not an overly complicated HUD but nothing explains it so if you want help, shout up and someone will help). The idea that non-compliance results in an attack is just to emphasise that this is an end game moment on a mission or infiltration: the mission can hinge on this moment, which brings in two important game play elements:
1) Your ability to evade scans - adds tension and requires skill
2) The way you handle the scan if it comes - adds tension and requires experience
If the result of a positive scan is you just get a fine or told off, there's no consequence to the process, no tension, and you can complete missions without caring too much. The lethal response is just a game play element and I think it's perfectly balanced considering it's always possible to evade the scan in the first place. Guards will only scan you once every 2 minutes or so and they will only do it if you get closer than the red circle on your radar. So passive scan the guards as much as you can so you can see them on your radar and then you can gauge their distance based on this:
This is safe. That arrow is the guard, they won't scan you.
This is not safe. The guard hasn't started scanning yet but is now looking at you.
At this frame, the scan process has started.
As you can see, it's pretty lenient. But it helps to know this.
Edit: it's not "insta death" either. Shields up, run away. I've completed missions following a scan gone wrong. But if you cannot, just run away, get to your ship and launch (or just quit the game in a safe location).