Is there any way to modify bone tracks with C++?

Thanks for your reply. I took a look at the node you mentioned but seems like that node is deprecated in UE5-EA. After reading the source code, especially those functions in the AnimBlueprintLibarary, I found UE5 introduced a new class to handle modifying animations. That class is called AnimDataController. Now with that new class, we can modify bone tracks by using

AnimSequence->GetController()->AddBoneTrack()

and

AnimSequence->GetController()->SetBoneTrackKeys()