NPC flies off the map at target

I just randomly started to get this bug using RichAI - when ever my NPC reaches his target he then flies off the map. No idea why it started to do this - any suggestions on possible causes so i can narrow down the issue?

Here is the animation of it:

It looks like the raycasting code is hitting the character itself so it tries to stand on its own head. Could you check that the ground raycasting mask does not contain the layer that the capsule collider is in?

I don’t have ray casting on - but it seems to be working today even though i changed nothing. I will have to wait for it to occur again.