Okay. So what you want is the relative position from the enemy to the player. Right now you are getting the position of the player (which is in the same space as the enemy, inside YSort) however, what you want is the vector from the enemy to the player. This should be the code, or at least get you in the right direction.
var toPlayer = get_parent().get_node("Player").position - position
draw_line(Vector2.ZERO, toPlayer, Color.red, 4, true)