Any time a mech unit's fuel reserve drops below 0% it gets refueled to 100%. This means that mech units are unchained from the supply system and can resupply fuel to 100% even if isolated.
Here's an example. Both screenshots are from the same turn. In this example the railhead is only 11 hexes away but it would be the same result even if the unit were isolated.


