I think your idea bears some useful points to start thinking on.
Already now, IL-2 has the ability the check whether actually AI can see an enemy plane at all, taking own plane obstacles into account as well as buildings, mountains etc.
But you're right that AI will instantly reacquire the target once it comes in it's sight again.
The latter could be changed closer to reality by taking a few parameters into account, e.g.:
- The larger the relative movement between own aircraft and target (when it moves out of sight), the longer you need to scan (because it will become hard to predict where the enemy will be).
- The smaller the relative movement between own aircraft and target (when it comes back in sight), the longer you need to scan (because it's harder to spot non-moving targets).
- The more G's are pulled by enemy aircraft, the longer it takes to scan (the future position will become hard to predict under heavy maneouvering).
- The more G's AI pulls themselves, the longer it takes to scan.
- The further the enemy distance is, the longer it takes to scan (dots becoming smaller).
- If the target is below the horizon when it comes back in sight, add a scan penalty.
With these factors a scan time could be calculated where AI would not immediately track a target when it comes back in sight, but just after this scan time has elapsed.
Best regards - Mike