The Bug:
Tree leaves can grow through walls.
Steps to Reproduce:
Summon a wall and a nearby azalea by using the commands provided below.
/fill ~1 ~ ~1 ~1 ~10 ~15 minecraft:stone
/setblock ~-1 ~ ~8 minecraft:clay
/setblock ~-1 ~1 ~8 minecraft:azalea
Obtain some bone meal and apply it to the azalea.
If the azalea leaves didn't grow through the wall, replant another azalea and try again.
Take note as to whether or not tree leaves can grow through walls.
Observed Behavior:
Tree leaves can grow through walls.
Expected Behavior:
Tree leaves would not be able to grow through walls.
I can also confirm this behavior in 1.18.1. This can be seen with all tree types and isn't just exclusive to azalea trees. Also, it's important to note that the logs from the trees can grow through walls as well.
[media]