Animation import (Blender->Unity) distorts planes

Hello,

I have encountered a problem when importing an animation of the scale of planes.

I have an animation made in Blender and exported into .fbx. Each plane (leaf texture) changes its location and scale independently of others (each plane is an object, I do not animate individual vertices). If I import this animation back into Blender it works as intended, however, when importing it into Unity, some of the planes become distorted and behave strangely. I have disabled animation compression and mesh optimization and removed the “weld vertices” option in the import settings and nothing helps. I have applied all of the transforms (so they have scale of 1.0 on all axes) before animating it, so this should not be a problem. The animation keyframes all capture location, rotation, and scale, so no data should get lost. I also tried to drag and drop the .blend file directly into Unity without exporting it into .fbx, but that also did not fix the problem.

Below are the animations in Blender and Unity - as you can see, the tree should have leaves on the bottom, but those seem to have the scale of 0 on the vertical axis at the beginning and in the end, the other two axes are squished.

Does anybody have any suggestions on what I should try to solve this problem?

Unity animation at the beginning, after a few frames, in the middle of the animation and at the end:

Blender animation at the beginning and middle (the leaves just get smaller progressively):

View of the planes in Blender (close up):

EDIT:
I also tried exporting the leaves separately from the rest of the tree, but now I get an error in the console:
"
ImportFBX Errors:
Take/AnimStack ‘Scene’ contains animation curves with invalid numbers (NANs) on these nodes (R - rotation): ‘Leaves’ (R), ‘Leaves.001’ (R), …
"

When I googled the error, I found information (at Unity Issue Tracker - Errors do not contain the name of the file with the issue when FBX assets are imported to the Editor)
that “This error indicates corrupt FBX file. In some case this error can be caused by having 0 scales in animation. 0 scales are not supported in FBXSDK. Use very small scales (like 1e-5) instead.

When I changed the final scale from 0 to a value close to it, it fixed the animation partially, but not completely, see below. There are not that many distorted fragments, but there still are some.

Okay, so for anyone who might have the same problem. I have no idea why this worked (if Unity or .fbx have some size limitation) but this if what helped me:

I simply exported the animation in two parts - leaves on top and bottom. This fixed all the distortions and everything works as intended.