Well, i think it's a thing to be tried. It depends who seems to lead the melee fight.
If a see that my ally is owning the ennemy, i won't shot. If in the melee, there is more allies than ennemies, i won't try.
But, if my ally seems to be in difficulty, or if he is surrounded by the ennemy, i will take time to aim, long time, but i'll try the shot. i'll wait fot the best moment, when i'll be pretty sur that i won't hurt my ally.
Unfortunatly, sometimes, it's not enough... i hit my ally. Well, sorry, i won't try again for this game.
But when it works, i never hear anyone raging, the melee fighter just keep walking, toward the next ennemy.
it's only by trying that an archer can feel the best moment, can see when he can, when he can't. Sometimes, he fails.
It's a challenge for archers, let them try, rage on them when they fail if you want, but i think it's a part of archer's training. Maybe 60% luck, but still 40% training.