Video to show what happens in Minecraft itself: https://youtu.be/GYHlwCEDqTg.
The video is from 1.16.3 (The same still happens in 1.16.5)
To describe it:
The function org.bukkit.World.generateTree(location, TreeType.WARPED_FUNGI);
Does not always spawn a tree, when it does it is NOT on the specified location. When you have some failed attempts it seems to generate those failed generations when a successful generation happens, suddenly it generates 10 trees instead of 1.
The same happens for the CRIMSON_FUNGI.