Line2d is sticking higher than expected

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By P0nya7no

Video of a problem - https://youtu.be/4h07G_8S92k

Code :

extends Line2D

var lenght = 5
var point = Vector2()
	
func _physics_process(delta):
	global_position = Vector2(0, 0)
	global_rotation = 0
	
       point = get_parent().global_position
       print(point)
       add_point(point)
       while get_point_count() > lenght:
       remove_point(0)