I've noticed you can often target enemies you can't see. You're not close enough to the ledge to see someone down there but can fire an arrow there with advantage anyway. Something's wrong with the LoS calculations.