A tree is a straight thing. It is unlucky to see such an object in front of the door or window in home feng shui. The solution is usually to hang a gossip concave mirror in front of the door or window, but you should have many doors and windows where you can see the trees. This method is not very practical.
There is also a better solution, that is, surround the trunk with a chain for five times, and then lock the head and tail of the chain with a lock head. Remember to choose an auspicious day.