From my understanding, in tpf2 the graphics and logical engine are run in async way that's why they are split.
in general in a game_script you have guiEventHandler and eventHandler, the communication from guiEventHandler to eventHander via game.interface.sendScriptEvent, then load/save get datas from game engine back to graphcis engine.
In general the two saves different states.
I have uploaded my Underpass mod yesterday and there is what I discovered in the mod about this.
I can create a floating window, put a button or text in it, run a script when clicking, open it and close it program also highlight it.
You can't get data into the constructions, everything is top level down, the only injection that I find is calling the construction from eventHandler, but I have yet tried to access a game_script global from the construction, I don't know if it works
But at least there's a way:
in common api game_script : guiEventHander -> proposalPreview -> open track selection window -> (waiting for) -> proposalApply -> (if the mod is declared to support api) -> sendScriptEvent -> (in mod script) upgradeConstrdution with injection trackType -> (close track selection window) --> in general what you said above but so far there's a bug there is no event when modification is on the way/done, nothing reacts to the module.
The states in params.module is saved, params will be clear each time.
Modular station is not mandatory, old construction script is working too