If your standard for what science fiction is us The Expanse then almost all of what's considered science fiction is fantasy.
Star Wars doesn't even claim to attempt this. It is a world of entirely made up rules and places for the sake of the story. There is nothing wrong with that. But it completely misses this key feature of sci fi.
There isn't a very clear delineation between the two genres. Star Trek also crosses this line into pure fantasy pretty consistently (an anomaly that compells everybody to sing and eventually produces a Klingon boy band performance? Or one that gives everybody amnesia and turns them into actors in Shakespeare drama - costumes and all?).
I'm not saying the distinction doesn't exist - The Hobbit isn't SF and Ringworld isn't high fantasy, but I am saying that between the extremes, it's mostly just vibes. There is no objective reason not to consider Star Wars science fiction, some people just find the space wizards too silly (while having a bookshelf full of "The author's barely disguised fetish or hyperfixation but In Spaaaaace.")