When leaf blocks are placed inside the natural bounding blocks of a tree that is not it's native type, the block will appear for a second and then glitch out and disappear and sometimes you can lose your block.
Linked issues
Comments 3
Don't do that. It disables vanilla game behaviour. See MC-123029.
Did you disable the vanilla data pack?