If one sees the moon through a tree, can one say birchat lavana lichatchilla? Its a clear night and you can see the outline of the moon, however, it’s through a tree? You clearly know its the moon.
Yes, it is permitted to say birkas ha-levanah under such circumstances.
The condition mentioned by the Gemara for saying birkas ha-levanah is that the moon should be bright enough to derive benefit from its light. Seeing the moon through a tree does not disqualify a bright moon from the berachah.