I think that's typically considered the difference between a "politican" and a "statesman" (or statesperson)
Politicians care about winning elections and staying in power, whereas statesmen actually give a damn about the future over getting eternally re-elected on empty promises.
The problem is that politicians run the show, so if statesman (or legislators) want to get things done, they have to play the political game anyways. Becoming politicians by default.
Which is, frankly, a ridiculous concept. If you only ever consider your own wants, compromise (a necessary concept in any non-authoritarian system) is impossible.