I believe the current lock-on implementation has a direction warning on the radar only appear after a weapon has been fired.
Like in many other games, it would make much more sense from both a balancing and realism point of view.
Balance
Without any warning systems, sufficient flares can never be deployed in time unless the lock is from at least 1.5km away, and even then it may be too late. While flares are never going to break the lock for sure, you should be given a chance to deploy them before you go status red.
Realism
IRL missile locks can be detected by most modern aircraft systems by their electromagnetic emissions. The strength of the detection is dependent on the strength of the lock, so as the lock is engaged, the signal and detection becomes better.