I think of the two as different genres.
Dune is science fiction in the classical sense: Posit a world with different physics/science/engineering/biology, imagine the societal systems that would have evolved under that physics/science/engineering/biology, and explore the consequences. Some of the very best SF falls into this category. Foundation is probably the best non-Dune example (in its case, psychohistory), but a more recent example would be Scalzi's Old Man's War series (a universe with many sentient beings competing over a supposedly-fixed number of planets, plus human ability to engineer bodies and transform consciousness between them).
In Dune's case, the alternate world is based on the Spice. It both grants extended life and makes the best acid trip you've ever been on look like normal existence, and also just happens to be the specific key ingredient to allow interplanetary travel (the Guild Navigators) and super-human intelligence (the Mentats). Imagine what it means to be the political entity that controls production (in the books: Harkonnen, then (briefly) Atriedes, then Harkonnen/Corrino, then Fremen), vs. the oppressed political entity that happens to occupy the means of production (the Fremen) without (at first) the power to control it.
In contrast, I would categorize Star Wars as something a bit different--rather than exploring the societal implications of its universe, it focuses on the paths of (some very specific) individuals that are personally the key to the universe's existence.
Both have appeal to the other. Paul is an individual who is key to the universe's existence, but the story is really about the society that created him and the political and societal forces that underpinned his ascent to power. It wasn't really about him. Likewise, Star Wars has the Senate/Empire/First Order scaffolding, but it's an underdeveloped, muddled mess, and even there turns on one person (Palpatine) rather than societal forces.
One that might be in the middle: Ender's Game. This has a mix of both. On the "classic" front, what happens when humanity is faced with a truly alien species (or, maybe better, an organism) that it must understand the mind of, and then defeat? On the "Star Warsian" front, well, Ender is Just Different in the way that Anakin and Luke are.