Edit: Ignore this! It's already done - as "shaders", I'm told.

------------------------------
2D sprite masking, in the sense of how programs like Flash or Animate define it where it's like looking through a window onto a sprite; the parts of the sprite that don't overlap with the "window" are invisible.
An image to clarify the concept, with mask sprite "A" hiding behind the backdrop "Bg" in the third panel so as to appear invisible:

Ideally SetSpriteShape could be applied to a masked sprite as you might expect - with invisible parts of the sprite being excluded from its hitbox.
My apologies if this is already in AppGameKit and I didn't notice it! I see someone asked about it in a thread a few years ago, but they were given a workaround that only applies to their particular example, and would not work in the case of multiple masked sprites moving independently of the background (and each other).