Thanks for the repro. As expected, the shader will only work with rectangular sprites. Let me explain.
I took your character and turned it into a single image, with the background pixels being fully transparent.

I then slapped that into a 2D scene and applied your shader as a material. Works as expected. Kind of.

If you look at the top of the character, you'll see that its shadow is cut off. The reason for this is that the shader is only applied to pixels that are part of the sprite. It can not extend past the boundaries of the sprite (or more correctly, passed the bounds of the triangles making up its mesh).
There's another problem. I've rotated the image by 90°:

The shadow still kind of works, but is now pointing in the oposite direction.

The reason for this is that the offsetting in the shader is done in texture space.
Now let's look at your SpineSprite
. First of all, it's not a single rectangle. It's a mix of many small rectangles and a mesh for the mouth and the leave stem.

The individual regions (rectangles) and meshes are pretty tight, so there's not enough space around the colored pixels to also draw the shadow via the shader. Just like in the case above, where the top of the shadow is cut off.
Worse, the regions and meshes map to images in the texture atlas, that are rotated.

Since the shader works in texture space, you get all kinds of weird shadows. This would look even less correct when the character is being animated.
TL;DR: you can not use this shader for anything but the simplest image. You can definitely not use it for SpineSprite
.
Your sub viewport idea is the way to go. You need to render the character to its own texture (with enough whitespace around it), then use your shadow shader on the resulting image.
I'm afraid I'm not enough of a Godot expert to help fix the normal map issue with the sub viewport approach. I suggest you hop over to the Godot chat or forum and ask for advise there for that.