Vertice rotation abnormality after reassigning SkinnedMeshRenderer.bones

I am modifying things in the character bones and then assigning them back to the skinnedMeshRenderer, everything works fine until we have vertex axis related needs.

SkinnedMeshRenderer[] renderers = characterInstance.GetComponentsInChildren<SkinnedMeshRenderer>();
            for (int ri = 0; ri < renderers.Length; ri++)
            {
                Transform[] partBones = renderers[ri].bones;
              
                //...doing some stuff here...//

                renderers[ri].bones = partBones;
                
            }

After this, it seems the axis of vertice on the skinned mesh have been changed, which can be seen in shading, e.g., when telling vertex to move along the model’s local y axis in the shader, now it becomes a movement along x(or z, don’t remember precisely).

How could this strange thing happen? Because I didn’t do anything with rotation in this process?

What are things that could possibly influence the vertice’s local axes? As I knew before, it should be only the mesh’s local coordinate, right?

But in this case, I didn’t change the mesh model space coordinate(as far as I can tell).

What happens if you don’t do anything to partBones, does it still show this behaviour? Can you add an image that shows the difference between reassigning the bones with a script and the original result?

The behavior is like, if I tell the shader to move vertex along its y axis, after this now it moves along x or z axis.

Doing nothing in-between(basically exactly the same as the code above) will also have this issue, that’s what is weird.

Logically this is definitely a rotation issue, but I am still checking up which step of this thing leads to this vertex axis rotation change issue.