Just to be clear, we’re not talking about getting on a spaceship and jetting about the galaxy. It’s pretty clear which that one is. (Unless the spaceship runs on unicorns and rainbows, I suppose. …and now I want to write that.)
We’re talking wardrobes, portals, holes in the ground, white rabbits.
Sounds fairly typically fantasy, right?
A character or group of characters stumbles onto some sort of mechanism that takes them somewhere else. No explanation, just one second you’re home and the next you’re some place full of strange people and creatures and truffula trees.
But the thing is – most of the time, no explanation is ever offered as to how or why the portal is there or how it works at any point in the story. We assume genre based on what the character(s) find on the other side. If it’s card soldiers or talking lions, we assume fantasy. If it’s a strange, other-worldly environment with fifteen moons, we assume scifi.
Some things are obviously one or the other. Some sort of explanation is offered. The faerie world is separated by a magical border, closed most of the time to mortals. The Stargate requires coordinates to be input through a computer before the portal opens.
But let’s take Peter Pan, for example. How do you get to Neverland? You think a happy thought and fly to the second star to the right, and then straight on until morning. Scifi or fantasy? (Oh, probably fantasy, but it’s very ambiguous. You could make an argument of it, if you were up to it.)
Some people will make the argument that it all runs on magic and thus is fantasy, but as the great Arthur C. Clarke said, any sufficiently advanced technology is indistinguishable from magic.
Like so many things in speculative fiction, it probably depends on author intent.
(But then you get into Science Fantasy and oh God everything is so confusing.)