Figured out why:
- The AI moves back and forth because of interference with the NavLink. May not be a solution but i resolved it by removing Navlinks altogether and using nav mesh modifiers.
- AI switches from moving to random position to move to last known location because of incorrect conditions in my behavior tree.