No shadows from Megascans Trees using Nanite in Ue5.1.1 after Packaging.

I think the problem was I was using Ray tracing instead of Lumen. I changed the lighting to Lumen and the shadows were working. Hope this helps.