I remember one science fiction writer whose books were based on planets where magic worked—so it was kind of confusing that is was called “science fiction”.
The author did not even attempt to give a scientific explanation for anything—they were just “magic planets”.
Lol.
There is a grey area between science fiction and fantasy, so that it’s sometimes difficult to distinguish them apart. So book stores usually just classify them all as science fiction/fantasy.