SDFImage fully supports masking, this scene is just showcase of that.
The only issue is when Shadow or second Outline layer with Softnessenabled, masked image gets aliased as if Shadow Width was 1.
Softness
Width