I don't see it, the one pekka in the core is going to the wizz tower and the other 2 are closer to the tesla so yea they need to get through a wall first, its AI is working as it should be
Atleast from what I see on the screenshot
And if you look, the tesla is just targeting that one PEKKA. The left pekka isn't getting shot at so he is going to go for the next closest building whether or not a wall is there. That's why he is going for the gold mine, the pekka that is getting shot at by the tesla is going for the tesla and then the right pekka is going for the next nearest building whether a wall is there or not.