I put particular emphasis on Dune, as I see it as the closest thing to a 'progenitor' of modern sci-fi in a similar (though much less intensely so) manner to how The Lord of the Rings is the progenitor of modern fantasy.
The foundation Saga was in many ways supposed to be at least particially tragic, its central premise is that there are cycles in himan civilization and that there are limits to our agency when dealing with them, and that some times the best you can do is try to save what you can and start again.
My thesis is that
The Foundation and
Dune are both fundamental to modern sci-fi, and that this is in part because they are both neither utopian nor dystopian. The author's viewpoint colours in the way everything is presented, of course, but they are both in many ways just... "historically
real".
The funny thing is that they describe the same thing, but with opposite evaluations. Asimov tells us that the far future willin many ways reject the tropes of modernity and return to more traditional power structures; so does Herbert. Asimov worries about demographic realities; so does Herbert. Asimov depicts the effect of prescience on human civilisation; so does Herbert. Asimov converns himself with the prospect of a united Empire falling, and humanity going into an age of division; so does Herbert. Asimov depicts a unique individual who doesn't fit into the grand plan of those who peer into the future, and puts that plan at risk; so does Herbert.
The key difference is this: Asimov sees the dark age as a bad thing, and sees it as a noble aim to shorten it. Herbert sees unity as a bad thing, and sees division (the Scattering) as the only way to save humanity from terminal stagnation. Which is why the Mule is an obstacle, whereas the Kwisatz Haderach is an indispensable necessity.
Regardless of these authorial views and evaluations, both Asimov and Herbert view things with a sharp eye. Their own opinions are evident, but they don't get in the way of the world-building. Either by accident or design, both men prioritise the story and the setting over what we now call "messaging".
Most utopian
and dystopian sci-fi, by contrast, is basically just a huge load of messaging. The author expresses blatant hopes and fantasies, or expresses blatant fears and anxieties. Typically, such works tell us little about history or the future. They only tell us things about the author and/or the author's generation. Which is also they such fiction very often becomes extremely dated, and very rapidly. (The few stand-out works of utopian and dystopian fiction that are less dated, one will note, invariably opt to deal with universal themes. And even then, elements that are soon very dated always creep in.)
In the end, I agree with
@ShadowArxxy that "a utopia will generally reflect the authors' idea of what an ideal future society would look like. Conversely, dystopian science fiction
still reflects the authors' viewpoint." That's accurate. However, this doesn't automatically tie back to "science fiction has always had progressive elements in the sense that science fiction is heavily utopian". Because it's not just progressives who are capable of writing utopias.
After all, just read
The Secret of the League (1907). That's often mis-identified as "dystopian", because to progressives, it reads like a dystopia. It wasn't written to be a dystopia. It was reactionary wish-fulfillment. A book in which a right-wing conspiracy deliberately causes social strife so that enough support arises to overthrow the left-wing government and institute a right-wing dictatorship. No wonder progressives all think it's a dystopia, right? But the author expressly views the events of the book as desirable. The conspirators are the heroes, and are depicted as saving the country.