Not sure what is happening. Maybe you can active the option to see collision shapes while running the game to see what is happening. Another idea is, instead of checking the sand, for example, create a collision shape that acts like a border, so when the player enters, something is done.
If this doesn't solve your question, I advice you to make another question, because this is now taggeed "Answered" and recieve less visualizations.
Sorry if my solutions doesn't work, I'm new to Godot, but not to programming.