The problem is that the
mouse_entered event only fires in the single frame where the mouse cursor entered the collision shape. So, by the time you enter the shape, and then press the button, you're no longer in the event.
I'd bet that if you first press and hold the mouse button and then move the pointer into the shape, your score will register. That's because you would have entered the shape with the button already in a pressed state, which will satisfy your logic.
Really though, you probably want to just wire the
input_event instead of the
mouse_entered event. There, you can just check your action. So, something like this:
func _on_RigidBody2D_input_event(viewport, event, shape_idx):