call change scene in func _on_body_entered(body) and check input in _process
but it would be best if you send the param of the scene name through the signal
probably after pressing enter both calls are activated and since it is in the process, one overrides the other…
try to print() to both of them to see if they both run
have already posted here one solution how I solve it in my project, so maybe it will help