Switzerland is an exception to this but it results in extremely complex infrastructure projects with of course a much higher cost and more accidents. However having the infrastructure available in many cases prevents overall economic losses due to less trains etc.
[1] https://www.srf.ch/news/schweiz/unfaelle-mit-bauzuegen-gleis...