Hard science fiction is quite distinct from fantasy, but hard science fiction is a niche subgenre of science fiction. It isn't and never has been the definition of science fiction. Outside of books from the likes of Asamov, science fiction is the exact same thing as fantasy.
When you have stuff like Rocket Robin Hood, Star Wars, Power Rangers, Doctor Who, and Yor: Hunter from the Future how are you possibly supposed to separate those into either fantasy or science fiction? You can't, so clearly the two genres are one and the same.