I'll put it in simple terms.
Add a custom signal to the mob, ie signal hit
.
Then, connect the area2D's signal on body entered(body) from the signals list in the Area2D to the mob.
Then go into the mob code. In there, there will be a new function on_Area2D_body_entered(body). Under that, type emit_signal("hit").
Then, go to the main scene, and add a mob to it. Connect the mob's signal hit to the player in the inspector.
After that, you can add your function to have the player defeated.
Now that it is done, you no longer need the mob in the scene, so it will be safe to delete it. Mobs will spawn with the signal connected to them.