I was once targeted for a scan with an elevation difference and the guard had to walk away from me, up a ramp, then back around. Lo and behold, his pathing got stuck on another NPC researcher who was passing by. I tried to move towards him to get the scan over with and was attacked. I
retaliated rightfully defended myself by annihilating everyone in that settlement and it felt therapeutically good
The moral of the story is, the system is not at all reasonable and neither should you be. Once PP 2.0 dropped, I was always carrying malware and E-breaches and would have been attacked on a scan anyway. I either blast their faces in or just maneuver around them. Remember that to trigger a scan, two conditions must be met:
1. The guard has entered your inner radar ring
2. You are in their line of sight
So basically, just be a bit more tactical in how you move and make sure you complete a visual ID if you see anybody so that they are permanently tracked on your radar. Prioritize turning off the alarm as soon as you land so things don't get hotter than you can handle.