What's the mistake? It's a normal distribution; the average is equal to the median.
You have to unload the ship eventually anyway, so you instead have it load into rail and disperse to final destination more directly.
You’d need a heat map of where everything ends up that is going through Panama, but if you’re dumping to rail many of those ships would unload elsewhere.
Or in other words, Europe will be hit much harder by this than the USA will.
It's probably a multi track system going all the way through China, Russia (with maybe Kazakhstan or Mongolia in between if they care about shortcuts), Belarus and finally to Poland. Then maybe upgrades to the European railways too to handle the excess traffic coming from the wrong direction (EU harbors are not in the East.) It's not something they can do in a short time and it takes a lot of political collaboration. I think that it's easier for them to win the war, if they can win it, and start buying Western Europe politicians again. Or just start buying them again while the war goes on.