Not that simple, at least in the U.S. Rail has far stricter requirements on turn radius and grade. As an example the highways around here have 6%+ grade segments (after tunneling!) and rail is rarely over 1%. I haven’t even mentioned the incorrect subgrade and the massive safety envelope (approx 20x20 feet) which is about 2 highway lanes wide and far too tall for the thousands of highway overpasses.
Rail truly is a unique infrastructure concern and needs to be designed and laid on its own.