Your problem is that instances are loaded at random coordinates in the instance grid. If the instance is small, I would recommend working with Local Positions (found by getLocalPosition methods). This is the position relative to the current map base. When time comes to walk to a position, translate your desired local position to an absolute position by adding the map base position to it (Map#getBaseX/Y).
If your instance is very large (eg. walking around in the instance triggers region loading), then you'll have to use a different approach. Commonly people select some object in the instance as the 'Anchor position' similar to how we can use the map base in small instances. Translating positions based on the absolute position of this anchor entity.