Hello:
The following shader code works as expected in godot 3.x, and the entire sprite is invisible in godot 4 beta 2:

shader_type canvas_item;
render_mode light_only;
void fragment(){COLOR = texture(TEXTURE, UV);}
void light(){LIGHT = texture(TEXTURE, UV);}

It doesn't matter whether the sprite with the shader is partially lit or not -- nothing gets displayed.
Doesn't matter whether the light source is point light or directional light.

6 months later

I'm seeing the same thing in 4.0.2. Not sure if it's a bug or if I'm just not understanding how it's supposed to work.