Q: Why do trains temporarily halt when making a rail transparent (or reverting from transparent)?
A: The way this mod works is that the rail entity is actually hot-swapped for a transparent rail entity. The previous non-transparent rail piece no longer exists, which makes any path going through this rail piece invalid. The affected train therefore must come to a halt immediately in order to re-route. Since the track is still continuous, the train will find a new path which (most likely) goes along the exact same route as the previous path.
Q: Why are some rail pieces not made transparent immediately?
A: When a train is inside a block (the rail pieces between two or more signals) this poses a risk for hot-swapping the rail entities. When a rail part is removed while a train is on top of it, the train also gets removed. To make sure that this mod does not accidentally remove trains, a mechanism is built in to delay the conversion, if possible within 10 seconds.