Big issue with rail is there are huge network effects are impossible to price in pure market. Which is why except for the US and Britain most countries built state owned rail. Britain and the US eventually nationalized or quasi nationalize rail. And attempts at privatization seem to fail.
Eventually, I would expect the amortized costs of a rail network to beat river barges, but that would take a significant time.
Heavy regulation is the usual culprit.
They just have lots and lots of old infrastructure that they can use and they don't need to share their rail with passenger travel, and their only responsibility is making a profit so they can cut anything away that isn't profitable.
Of course that then just leads to more traffic and trucks on the road. So far worse for the nation as a whole.
Writings I've seen basically say transportation systems fail under the free market eventually.
https://www.filfre.net/2022/01/a-web-around-the-world-part-2...
https://www.filfre.net/2022/02/a-web-around-the-world-part-3...