Canceling uninitiated rail building constructions placed over rails yields back the built rails.
When you place any rail building (eg. level crossings, station buildings) over rails but reconsider placing it in a different spot, canceling it (without it having begun or being completed) will leave a gap in the rails. It would be nice that only if you build over rails you get back the built rails. that would make planning out spacing relevant ideas more engaging to build as it would be very interrupting to running tains.
Additionally, it kind of makes sense that the stations and so on would be build *around* the rails and them not being completely replaced. But that's more a realism aspect than a gameplay one.
Additionally additionally, maybe there could be an option to only delete the building without the rails. Same logic as above applies to that trail of thought.