Use a Sequence node, a Do Once node, and a timer.
Have an event that can be called that resets everything, that you can call on Release, on running out of Stamina, on getting knocked over, whatever.
You need to have a check at the beginning for your current movement speed being greater than let’s say 300. So it can’t activate sprint if you’re moving slower than 300.