I always liked the distinction (I forget who originated it) that science fiction is a story set in a world where the rules are defined by physics and fantasy is a story set in a world where the rules are defined by the author.
I don’t know if you’re brave or foolish, but either way, vaya con dios. The Star Wars fans are relentless.
Dune is more fantasy than Star Wars and many consider it one of the best sci-fi of all times.
There’s a lot of science fiction where the rules of the world are defined by the author. I think the difference is that the foundation of science fiction is on what the world is, both literally, and metaphorically, while the foundation of fantasy lies upon what the world could be, hence the name fantasy
The point is that if the rules aren’t grounded in science, it’s not science fiction. You can have the trappings of science, like space travel or whatever, but if people are moving objects and doing impossible acrobatics by using a magical force, it’s fantasy.
Though not mine, I personally think that definition works better than most. Still, if you pin me down, I’d say that there’s a spectrum, with hard SF (where everything is rigorously anchored to scientific principles) at one end, and pure fantasy (with magic and such) at the other. There are lots of things between those endpoints, with some being closer to one or the other, and some being very much in the middle.