https://www.theguardian.com/us-news/2024/dec/22/us-shoots-down-two-of-its-own-navy-pilots-over-red-sea-in-apparent-friendly-fire-incident
https://www.theguardian.com/us-news/2024/dec/22/us-shoots-down-two-of-its-own-navy-pilots-over-red-sea-in-apparent-friendly-fire-incident
IFF is just a transponder. The missile itself cannot determine who is friendly or not, and can absolutely get confused by radar/IR signature.
What we do know is that Israel has exploited this tactic before (on a larger scale) by having their F-16 shadowing a Russian military transport plane and caused it to be shot down by Syrian SAM