It is possible to build an object that is behind a tree, but is not possible to select, get mouse-over info, or tear down an object that is behind a tree without tearing down the tree itself.
For example, here are two electric poles behind trees (I put dots in their selection boxes):

The yellow one is possible to select but tricky. The red one cannot be selected without removing the tree.
Suggested fix: Always prioritize object selection boxes over trees, regardless of which one is in front. Note that this would still never lead to a situation where a tree became impossible to mine (e.g. if there was an object in front of it, there'd still always be an area that only had a tree selection box on it). I can't think of anything it would break.
I believe trees are unusual in that their selection box extends so far above their collision box, so it is possible to place objects behind them whose selection box becomes completely obscured.