How to solve the issue of foliages being crazy after migrating the 5.0 project to 5.1 and enabling Nanite.

How to solve the issue of foliages being crazy after migrating the 5.0 project to 5.1 and enabling Nanite.
Here’s a video: https://drive.google.com/file/d/1mDy9Yk4W5vJEF3JuIwNYkw0zuhK3GpXi/view?usp=sharing