How to toggle sprint cancel movement when no input?

Simple, add And and check that Speed > 300 which should be walking speed.
You can also throw them out of sprint if speed is less then 300.
This will stop sprint if they hit a wall…