It's a surprisingly hard problem.
Let me suggest a different method of classification, one which hinges on the nature of magic. In fairytales, and in the Arthurian cycle, magic is a manifestation of chaos. The antidote to chaos is order. Magic is defeated by an appeal to a higher order. Thus Aslan defeats the White Witch because he knows, and she does not, a higher law. To put it another way, magic is defeated by virtue, a constant theme of the Arthurian cycle. Fairytales, in other words, are about the conflict between chaos and order and magic -- the violation of the natural order -- is the manifestation of chaos. As such, it has no rules.
Science fiction, on the other hand is about competence. The antidote to incompetence is competence, and competence is gained first and foremost by knowledge. Magic, in the Brandon Sanderson sense of the word, is not a manifestation of chaos. It is an alternative physics. Victory comes through the mastery of this alternate physics, not through higher order or virtue.
Which leads us to the question of whether fantasy is on the side of fairy tale or science fiction, and it would seem that today it is more and more on the side of science fiction -- a story with fictional science, rather than a fictional story with real science, but still fundamentally about competence.
I think you will always be unable to draw this line clearly because stories are about as human as things get, and humans are very, very difficult to put into neat categories. Heinlein preferred the term speculative fiction himself.
If you really do need to label it, just imagine someone who doesn't care at all about any of this being sent to a bookstore to find the book. Where are they going to look for the Star Wars novelization? In science fiction. Dragonriders (dragon-anything)? Fantasy. Yes, yes, Star Wars is as unscientific as it gets and Dragonriders of Pern has some orbital mechanics and HNO3 and all, but where will most people actually look? If there is any use to hard categories like this, it is in helping people find things.
I think about scifi vs fantasy as scifi basically proposing a premise and the story exploring what would happen based on that premise, while fantasy isn't generally constrained by logic or any set up premises. Instead, fantasy stories progress in an unconstrained by any logical setup. I think stories involving the future and technology can just as easily be fantasy when they justify anything they want with technobabble. I assume that stories about the past or magic can just as easily be science fiction if the rules are clear and adhered to, and if they matter to the story.