Pathfinding prevent 180 turn

Hi, I am working on a 3D Pacman Game using Blueprints and the UE4 standard NavMesh pathfinding. It works all fine, but i can’t get the pathfinding to prevent 180 degree turns. In Pacman, the ghosts can’t directly turn around and have to find another path instead. Does anyone have an Idea how to achive this? (im a complete path finding Noob, but I could change the pathfinding system if required)

Thanks for helping