This won’t fix the issue, but it would be a good idea that it’s the player that entered the area before destroying the gem, otherwise any physics body will work.
Have you connected the signal body_entered to the function _on_body_entered() from your script? (For this to work, the script needs to be on an Area2D. If that’s already the case, putting extends Area2D instead of extends Node2D would make that clearer)