Move To Task in Behavior Tree appears to ignore pathfinding

I am working on an rts like game and soldiers are produced by some building and supposed to walk to some target location. I implemented this behavior using behavior trees with a move to task. However, while they are walking towards the correct target location, they do not make use of any pathfinding, still attempt the direct straight path and get stuck once I block the direct path with some building. From my experience with the top down unreal example, the pathfinding should be able to find a better suited path, but for some reason, in my case the units are not doing this. Is there something I have to consider when using the Move To Task in Behavior Trees to allow for unreal’s pathfinding?

Do you have a nav mesh in your level? You need to use navigation in order to pathfind. There are many tutorials on this on youtube.