Change skeletalmesh in beginplay but missing animation

I’m learning the Lyra and create some ABPs and use LinkAnimClassLayers to Link my pose at the Beginplay like that

And when I change the skeletal mesh asset(Compatible skeletons) in the editor,it can play with my Animation Blueprint.

Then I’m trying to change my skeletal mesh by the character name in c++, it can change my mesh but with TPose ,not my animation ,why was that?

part of code,I put it at the Beginplay

If I use blueprint like that ,everything is correct,but why?