Similar to templating animation channels in the Graph Editor, you can set animation layer curves to be automatically templated when their corresponding layer is locked. The locked layer's animation still contributes to the result animation in your scene, but its associated curves and keys in the Graph Editor appear gray and cannot be selected.
To template the curves of locked animation layers
When an animation layer is locked, its corresponding animation curves are templated in the Graph Editor.