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.