The day may come when you, nor your enemy, can be seen on radar or infrared. If that happens, neither one of you would be able to get a lock on the other. The only option would be for a close-up dogfight where both pilots could get vis on each other with guns being the only option.
I believe to think that gun kills for fighters are a thing of the past is a mistake.
P.S. Don't forget a EMP may take out a lot of electronics, so I wouldn't get too dependent on them in future wars.