I mean the shortest possible movement path directly along the trail – the brown path covers 2 trail cells and then initiates an attack. The red paths go through the Guardians of Order dragons, which are standing on the snow, and the movement takes 2 cells directly across the sand. The right red path – first, we position ourselves on the respawn cell to the right of the dragons, and then attack the Guardians of Efreet along the shortest possible path.
The rule needs to be formulated in text and in a general form, suitable for the entire range of possible situations.