The Issue
When using a custom worldgen datapack that affects trees in 21w38a or later, trees will spawn generating ontop of each other, creating large tree walls. This is similar and possibly related to MC-237500, the issue with the Azalea trees occasionally spawning ontop of other trees. This issue does not occur in 21w37a or earlier. Because I reported the bug late, I was unable to list the affected versions to include 21w38a or 21w39a, but it also occurs in those.
Expected Behavior
Trees generate like normal, not stacked up ontop of each other.
Observed Behavior
Trees are generating in pillars, stacked up ontop of each other. They generate with dirt blocks underneath them as well, ontop of which the next tree spawns.
Replication
To encounter this problem, I was using the EMD's Better Trees (https://www.planetminecraft.com/data-pack/better-trees-4969464/) datapack. Simply place the datapack into the datapack's folder when creating a new world, and observe any biome that has trees in it.
Attachments
Comments 5

Can confirm in 21w40a.
Just tested in 21w41a, still occurs

Working as intended. Vanilla trees now use the block_filter
decorator to check if the block below is valid. You need to do that as well. I suggest you take a look at the vanilla files.

This is actually a bug with my datapack.
The changelog doesn't say the technical world gen changes, so I had no idea why this happened until recently.
I cannot add that it also affects 21w38a and 21w39a in the list, but it also affects those