Use the is overlapping condition with your events to select the correct tree to place behind/in front of.
Repeat that for all 3 trees.
Or you could add all three trees to a family, say "Terrain", and change the tree references in those three events to Terrain. That way all the trees will be handled in just three events. It also makes it simpler to add other visual blocks such as signs, rocks, etc... without the need for extra events to do the sorting.