Same way with how they can shoot you, but you can't shoot them. You're further from the trees, and so your shells are higher in their arc when they reach the trees, but since hes closer, his rounds aren't as high as yours when they pass the same point, and therefore they can still pass under the trees.
The same basic principals let you fire over a bush to hit someone, while the bush simultaneously provides cover for you. You're further from the bush, and so can aim over the bush and have your rounds drop onto the target, while he is closer to the bush, and so can't aim low enough to target you without the bush obstucting his fire.
However, LOS has nothing to icon distance. Objects may obscure or even completly hide the icon, but its not linked to whether or not you can see the vehicle that the icon belongs to. Same thing lets very low aircraft hide their icon to a large extent. Since its underneath of them (from your point of view), if they get low enough, the icon will disapear under the ground, and be invisible. That doesn't mean the icon turns off if you go low enough, simply that it can be hidden from view.