Investigate different sounds not working

I followed a YouTube tutorial on artificial intelligence. To allow the AI to react to different perceptions, I had to create a enum with states and add it as a blackboard value. All the states work fine, except for the investigation where the AI goes to the sound location. I want to make the AI go to the most recent sound, which means that the state should be reset in the behaviour tree. Why doesn’t it reset even though the location changes and the state is set again? It should just restart the sequence from the beginning.

Behavior Tree:

Handle Sound Function:

Set state function: