[1] by the US, Iran has used it more with more success.
https://en.wikipedia.org/wiki/AIM-54_Phoenix#U.S._combat_exp...
In the case of the US involved conflicts it was working with allies and fighters lacking modern IFF that made the likelihood of friendly fire or collateral losses unacceptable to them.
It's a matter of acceptable risks. The AIM-54 was designed with a world war III in mind, employed in the middle of the ocean in closed airspaces were unidentified contacts could be treated as hostile with minimum political consequences.
The point I was making is here is an example of a time a major force decided not to use their prime BVR missile because of target identification concerns.
And the reason it wasn't used much wasn't just ID issues, but cost. It was supremely expensive, in limited stocks. Why use it against an Su-22 in the Gulf of Sidra? Or waste it over Iraq?
[1] https://en.wikipedia.org/wiki/AIM-120_AMRAAM#United_States_o...
Unaided pilot vision is unlikely to spot a target at 22 miles without some type of guidance.