How to make ai ignor obstacles if way around to long (blueprint only/no behavior tree)

Hello, i use simple move to in the blueprint from an ai. If there is an object with a navmesh obstacle the ai avoid this. If is there no other ways the ignore this navmesh and this is good. But if the way around is very long, the ai go everytime the long way.
My question: How to make the ai ignore the navmesh obstacle if the Path longer xxx.

Bad english, I know :wink:
Thanks,
Paul