yeah, in my opinion it's bad practice to use an absolute path (it will break if you rename the scene or the player) and not needed at all. You can put your player into a group and check that
# area2d.gd
func _on_body_entered(body: Node2D) -> void:
if body.is_in_group("player"):
body.health = 0
Or you give your player a class_name
# player.gd
class_name Player
# area2d.gd
func _on_body_entered(body: Node2D) -> void:
if body is Player:
body.health = 0