Not always the case. Sometimes the gui app is just wrapping some script written in a general purpose language. Button just calls a function. Yes writing the function to draw the ui button element might take a different syntax, but they might go on to run the same underlying function.
At least that is how I like to write my gui software.
It’s powered by react.
But it so decoupled from react you can slap mini gui in any other form / framework in a day