Good find!
The "Diesel tax levels" charts (p28, p81) show the UK charges the same (0.7€/L) for both road and rail use, and most EU countries charge a tax, although more than half have less tax for rail than road use.
Electricity is taxed in a few countries.
This report seems to show that trains mostly pay for infrastructure and the network: https://cedelft.eu/wp-content/uploads/sites/2/2021/03/CE_Del...
I think British trains pay for “red” taxed diesel?