It's not just the area they were flying in, it was the role they were engaged in as well.
There was nothing in the Geneva Convention which covered the rescue of unwounded aircrew/sailors from danger.
That is so, but the legal argument for shooting them down would be based on their position which would fall foul of this condition.
"In the absence of special and express permission, flying over the firing line, and over the zone situated in front of clearing or dressing stations, and generally over all enemy territory or territory occupied by the enemy, is prohibited."
The legality was never tested, not least because we won.
Cheers
Steve