Ok you've got four layers in your layout, from top to bottom, in the following order.
A character layer, for the actual player/npc's etc.
A shadow layer, where sprites of fake shadows are placed.
A middle layer, lets call that "walkway".
A background layer which is supposed to be empty or far away, lets call that "stars".
As the character and NPC sprites moves around, the shadows under them follows correctly and all works great, except the shadows appear where they shouldn't, in this case they appear OVER the stars layer in the background, rather than being clipped at the edge of any artwork in the walkway layer like they should. Resulting in it just looking wrong.
How do you stop the shadow sprites from appearing over the stars layer? You can't use Canvas (and wouldn't work for this anyway), you can't erase the shadows around the edges of the walkway layer by using eraser sprites because the artwork has an intentional irregular edge as well as many small spaces within the artwork from alpha channels (think the spaces between branches of a tree) and therefore you'd be having to use thousands of perfectly shaped sprites to do so, which isn't a viable option (even though it works, it just isn't usable in this case).
I trust this is possible to fix though. The sprites in the shadow layer must not appear over or effect the stars layer in any way. However sprites in the characters layer may cross unaffected. This only applies to the shadows.