Those items in the inspector are purely shortcuts to the MeshRenderer's sorting properties.
Just change MeshRenderer's sorting layer and sorting order in code.
Despite being hidden in the inspector, those values are also serialized as part of MeshRenderer's object, not SkeletonAnimation.