In my last game (which I started on 1.3) I saw a lot of this happening. The AI, running away from my units, moves to a square that is not part of the traversable terrain of the tactical map.
They typically only move to the square just outside, so I can still hit them, but I cannot target them with abilities or spells. Sometimes, however, the tactical map has traversable squares that are separated from the rest of the map by untraversable squares, so you can't get to them, but the AI can. At that point, if you don't have ranged units or damage spells, you have to hope that auto-resolve will favor you.
Below are two screenshots. One shows an AI unit in the separate traversable terrain, and the other shows a unit just outside of the traversable terrain (he's been knocked prone in the screenshot, but he was already in that square before I hit him).

