Russia and Ukraine have the same gauge. The reason the railroads weren't used to invade is because Ukraine managed to damage the connecting infrastructure enough. Turns out that railroads are a lot better defensively than offensively, in an era of widespread drone usage.