Despite numerous definitions, sometimes I think of sandbox as "you can go anywhere in here" and railroads as "you can ONLY go this way".
But last week the PCs were exploring an unknown area of the hex map, looking for a ruined castle of legend.
They were surrounded by forests, and had no exact clues about the location of the castle (only that it is "near the river" and a couple of clues they can find in the way), so they just wandered around a bit, looking for more information, "opening" new hexes.
(BTW, Hextml has this cool "fog of war" effect that can help you manage that).
So, you could say they are in a sandbox... they can go anywhere, but... until they find the castle, there is no difference. There is just more forest and rolling for random encounters.
This is not exactly a railroad, but the result is the same no matter the direction they go (again, until they find the castle).
Let me illustrate this:
In an hex map, if you're going from "B" to "A", you can try different ways - assuming you cannot simply draw a straight line because you don't know the EXACT location of B.
But it doesn't make a difference. It is all forest. Same speed, same chances of getting lost, same random encounters.
In fact, even if the PCs suddenly decide to go THE OPPOSITE DIRECTION, to C, or if they get lost and wander into the mountains of the North, or travel South until they see the ocean... you STILL know exactly what is going to happen in the next week or so (if that's the distance from A to B).
Of course, this does not feel like a railroad if you have interesting, preexisting, features in EACH hex (which I don't).
Random features and random encounters, however, do not change the railroad "format" of this experience. If you roll to find out there is a cottage or an ogre in the new hex, it still doesn't matter if the PCs went North or South: the result would be the same.
Anyway, I don't think this is an actual railroad, because, while the PATH seems identical, the destination is different. The PCs haven't had their choices negated. Their choices are irrelevant for this week (they literally have a random encounter with an ogre whichever direction they go), but ultimately they'll arrive in a different destination.
But this is an interesting aspect to consider. There are SEVERAL dungeons scattered across my sandbox, and I'm always a bit worried that the PCs choose to go to a dungeon I'm not entirely familiar with (I cannot memorize all this stuff, TBH).
I don't want to "force" them into a dungeon , but I'd really like to spend at least half an hour reading it before they enter.
The fact that I know exactly what happens on the way to the dungeon - NO MATTER WHICH WAY - might be an interesting tool to give me time to prepare.
Maybe I could even roll/prepare half a dozen encounters beforehand (I'm currently using this) and know exactly what is coming in the next session - regardless of the direction the PCs take.