Three possibilities:
1.) It was flying in formation with the U.S. Drone, and not resolvable.
2.) The U.S. drone was not equipped with a Mode-5 transponder, or the U.S. base did not have a Mode-5 interrogator.
3.) Iran hacked Mode-5. (Remote chance. Even if they did, they would not squander that advantage for what was a pinprick raid. What would China or Russia pay for that advantage?)
Most likely it was human error, with an operator mistakenly designating the track as “friendly” because it coincided with a returning drone. Alternatively, if you interrogate a new track that is in close proximity to a friendly track, you can end up with incorrect data from a friendly track’s transponder being associated with the new track. It’s also possible (though rare) for the system to swap track data when 2 tracks are in close proximity. I’ve seen all of these happen.
It’s possible the US drone didn’t have IFF. Outfitting some smaller drones are still a work in progress, even though there are miniaturized Mode 5 transponders available. USAF is lagging the joint USN/US Army program.