For anyone in UE5 and the running anim stops after a few second go into the anim graph > locomotion and into the running state. Then select the RunForward anim and under details on the right go to settings and ensure that Loop animation is selected.
That was helpful.
Thanks for posting this. I just spent waaaay too much time looking for a solution to this. I hope they update these older UE4 courses.