not to mention the problems a dedicated enemy ECM will do to IFFs. or the Russian idea of using IFFs as targetting beacons.
electronic sensors also help little against enemy targets, who certainly won't give you their electronic signature codes in advance
so with both blue and red forces, (IR) visual detection is something the F-35 relies on heavily
here are images from the optical seeker on the Python 5, you'll see that the aircraft are easily recognisable even to human eyes:
here's an example from ARGUS-IS:
also we're talking here about something like an F-35 flying in at maximum range
but what is to keep something like an RQ-170 to close in guided by long range radar scans, sitting almost on top of the ship to get the best images, and uploading the high quality images via undetectable satellite link to a Pentagon supercomputer who'll have very little trouble identifying the images correctly. that gives you excellent undetectable, on site targetting information, at a fraction of the cost of an F-35, like your personal miniature satellite
"before you can access this top secret data, please link the image on the left to one of the ship blueprints on the right"