Shader that causes light texture to also act as a mask on sprites

Godot Version

4.3

Question

I have a Light2D with a simple texture, and a Sprite that has a CanvasItemMaterial with Light Mode set to Light Only.

In the screenshot below, the sprite isn’t visible outside of the light texture:

However, instead of sharply cutting off outside the texture, I want to sprite to fade out, as if the light was also acting as a mask on the sprite, something like this (mockup attempt using GIMP so values are way off, but hopefully you get the idea):