Railways certainly did pay rates! Even during WW1, when they were under government control and allowed an income based on their 1913 profits (which involved a large subsidy.), they paid based on pre-war valuations.
Then the Railways (Valuation for Rating) Act 1930 took "railway hereditaments" out of the standard valuation process (local valuation committees) and created the Railway Assessment Authority to do it instead. This did a valuation on standard principles (based on net receipts) of each railway as a whole, which could then be divided up between the rating bodies so the total was right. In its first year the authority used financial data for 1928 and 1929.
So note that the "big four" were still paying rates at what was arguably the traditional level. But if they started losing money their rates would, presumably, eventually fall to zero! This system did, I think, continue through WW2, no doubt with fictitious numbers. Then, at nationalisation, their rates were replaced by a central government grant, and then became part of the support grant system. From then on the railway itself was not rated.
Non-railway properties owned by railways - houses, hotels, refreshment rooms etc. - were valued and rates were paid like any such properties.