While there is certainly dystopian steampunk fiction, I don’t thinks dystopian tropes are a defining characteristic of the genre.
They literally are, though.
That's why it's called steamPUNK.
That's the core of the old conflict about what should be called "steampunk". If there's no dystopia and no resistance to that dystopia, and there's no punk element, and you haven't got steampunk. You've just got some kind of romanticized Victoriana alt-history. But the aesthetic became more dominant than the actual meaning of the trope - that happened by the end of the 1990s, so "steampunk" is still usually used to describe romanticized Victoriana and HG Wells-esque retrofutures that as
@Umbran says would be better described as "gaslamp fantasy" or just as Victoriana.
And while the Victorian era certainly had its share of misery to go around, categorizing it as dystopian may stretch the definition of a tad.
I'm sorry but absolutely not.
It's not at all a stretch to suggest that or categorize it that way in the UK, which is where the majority of this stuff was set. Maybe in some newly-built city in the US or Canada or on the frontier or whatever you can easily dismiss dystopia (particularly as the US also had a shiny new political system, not the decrepit and failing one the UK had - the US also had a lot lower "oligarch count"). But in, say, London in the UK? Absolutely much of the Victorian era was easily dystopian, truly horrifying, in every way that mattered. And, to be clear - worse than the immediately preceding period in many places.
There’s nothing inherent in a Victorian setting that requires the hero to struggle against the worst excesses of the era.
Maybe not but it seems utterly horrific to me to set a game in Victorian England (or similar) and expect the players to just ignore the extreme horrors of that setting and enjoy being jolly gentlemen (and anachronistic jolly ladies) in top hats as their society basically throws starving children into machinery for profit. As living standards for much of the population absolutely nosedive solely for the sake of the mighty pound. Only because in reality, people did resist, did push back, did things improve.
Personally I just refuse to play in games that are set horrifying societies but where the GM wants us to be advantaged members of that society yet to not actually do anything about what's wrong with that society.