Ran into this when playing the introductory tutorial.
I think there is a small mismatch between CheckMovement & the vertex pathfinder when computing passability, but tbecause one is ray-based and the other just uses edges, I can't find it / it's beyond me. This can lead to units being stuck near building edges occasionally.
The fix I propose is a straighforward hack that shouldn't impact motion much in general: try to back up when we have a short-path and a lot of failed movements. It unstucks the attached replay anyways.