Allowing free terraforming of roads at dead-ends is not correct behaviour
You might have missunderstood.
The alignment itself is not free. There is simply no additional costs on top of that.
However, I agree the correct behavior would be charging the same costs as if the road was removed, the terrain aligned and then built afresh.
In reality, one cannot raise or lower a road.
In reality, for example level crossings are often removed by
1. placing bypass signs
2. shutting down the old route
3. building an underpass or a bridge
4. re-openening the road via the bypass or bridge
5. removing the remaining part of the old route.
That's a lot of micromanagement and in addition, the second point is not even posible at all in simutrans in very many cases.
About realism, it is much more unrealistic if players are forces to kill half of a city quarter just to build a bridge, so imho the best compromise we can come up with is actually merging all that involved micromanagement into a single step.
For sure, costs have to be paid accordingly, so internally
1. remove the way paying the removal cost and refunding the land value, just as any other destruction of ways does.
2. align the terrain at the usual terrain alignment cost
3. build the new way as usual, paying way construction costs as well as forge costs.
I don't see any problems here.
Communitcating these costs should indeed be done, but that's a more general issue I suspect.
In standard, aligning terrain around deep water can quickly run companies into bancruptcy because the slopes cascase down the water.
In extended, it's not that bad because we are not allowed to do such alignments, but it's the same with slopes around steep hills. A single missclick can quickly cost 100k either without any warning, so such a warning and confirm system should generally be prefered, wherenever the cost exceeds the cost of the used tool by a lot, whatever that "a lot" means is up to detailled discussion, but in any case that warning is a feature on its own imho.
There is then the question of what type of bridge or tunnel to use when the type currently in use is not available
In any case the one that was last selected in the menu.
That's just the consistent behavior to bridge and tunnel construction as-is.
We may want to add another type of highlighting to the menu, so we get a secondary and primary highlighting of way tools.
Theprimary highlighting shows the currently active tool. The secondary highlighting will show the previously selected way, bridge, tunnel and elevated way, so there will be (up to) 4 secondary selections at the same time.
Enforcing something "at least as good" is not always possible, as normal ways do not have a maximum weight, where bridges do have such.
The current system does not do this either! Players can build a detour, then a low weight bridge and finally remove the detour again without any problems and as mentioned before, I cannot imagine of any (practical) system that will make obstruction of other players impossible.
This is and will always be up to the community to be kind and non obstructive to each other. In the worst case it is up to moderation or administration to intervene here.
Again, allowing immediate upgrades does not add new ways to obstruct other players. It just cannot fix the existing ones either.
On top of all that, there is the great complexity discussed briefly by Feahk in deciding what actually happens with every possible combination of terrain modification being applied to every possible combination of ways on a tile
Once the core idea of this feature is accepted, we can discuss this in more detail and I am quite sure we will find a consistent solution to this.