@paatz04 Unfortunately there is no direct "mask bones from being applied" feature available.
If you have lots of animations to duplicate (with leg keys removed in the duplicate), you could write a SkeletonDataModifierAsset
to be assigned at the SkeletonDataAsset which duplicates certain animations and removes any leg keys from them.
On the animation side, there might be some tricks available to use IK mix values set to 0.0 or 1.0 to enable and disable parts of your animation, however I think that this will be a rather complicated setup which creates more work than it saves.
You could also modify the source code to add a masking feature yourself based on name strings, however I'm afraid this would be too much effort as well.
If anyone knows other solutions or workarounds, please don't hesitate to share your wisdom below! 🙂