2D Light Shader moves ahead of points

Godot Version

Question

New to both programing and shaders i decided to try my hand at setting up lighting for a project using shaders. However when I move my character, the lights created by the shaders move ahead of the points their connected to.

To set up this project, I have marker2D nodes providing their coords and their light_radius to the shader throught the vec3 lights array.

Here’s what the shader looks like when im not moving the character, and what I would like it to look like when they are moving as well.

Here’s what the shader looks like when im moving the character, as you can see the transparent areas seem to move in the direction of my character ahead of their points even on the stationary objects.

the node this material is held on is a colorect held withing a CanvasItem

shader_type canvas_item;

uniform sampler2D screen_texture : hint_screen_texture, filter_nearest;
uniform vec4 modulate_color : source_color = vec4(0.0);
uniform vec3 lights[100];
uniform int number_of_lights = 1;
uniform float scale = 1;

bool distance_to_light(vec2 coords) {
	bool lit = false;
	
	for (int i = 0; i < number_of_lights; i++) {
		float new_dist = distance(coords, vec2((lights[i][0] * scale),(lights[i][1] * scale)));
		
		
		if (new_dist < (lights[i][2] * scale)) {
			lit = true;
		}
	}
	return lit;
}

void fragment() {
	COLOR = texture(screen_texture, SCREEN_UV);
	bool lit = distance_to_light(FRAGCOORD.xy);
	
	
	if (lit == false) {
		COLOR = COLOR * modulate_color;
	}
}