I have never (and may never) run an adventure path or any kind of scenario that
wasn't heavily tilted toward "do what you want" there may be consequences for not
addressing problems that come up, but the campaign itself isn't built around set
ways of addressing them.
But I am curious: how do you (personally) keep players on adventure paths?
How do you get players to get off of one?
Even if I create a railroad with the idea that it might fork at various points, and go off in new directions, in general my players have a tendency to keep trucking down the mainline. I'm not entirely sure why, but I can give a couple of theories.
1) The mainline is the democratic or consensus direction. Taking a fork is usually taking a risk or prioritizing something controversial. Often as not, it means deciding to do something that would make a character in the party uncomfortable and possibly a player. Why can't we switch sides and start backing the BBEG? Well, because what are we going to do with the cleric who is supposed to be upholding good and light? Why can't we just go off and become pirates? Well, because first no one is actually a good sailor and secondly because the knight is sworn to uphold the law and the parties letter of marque expired when the war ended. Or conversely, if you have a whole party of renegades any assertion that maybe we should stop acting like a bunch of greedy jerks all the time is likely to get shouted down. In general, people are afraid to advocate for their viewpoint for fear of creating tension in the party, so they just stay quite and go with the flow - which tends to be in the direction of the adventure path.
One thing I've learned over the years is just how dramatically the number of players you have impacts what stories you are able to run. So much of Indy gaming advice is so obviously geared toward having 3 players or less. The few players you have, the more intimate and personal you can run your games and the more the inner mental life and desires of an individual character (and player!) shape what the game is about. When you get up to 6 or 8 characters, you just don't have time to shine the spotlight on any one character's private life for very long. You just don't have time to spend half a session on melodrama, character building, and riffing off of a single characters backstory and goals. Unless every characters goals are on the exact same page, time spent on those side stories has to be sandwiched at sometimes long intervals in between the main plot that interests the whole group.
2) I think there is some fear that if they switched gears and did something that they "weren't supposed to do" that for some reason I wouldn't be able to handle it. I don't know why they think that, because they know that they are less creative than they think that they are and I tend to stay several steps ahead of them no matter what they do and that I can improvise pretty well, but the fear of 'going off the map' seems to be still there like suddenly if they do the wrong thing they'll walk into an empty set like some episode of the twilight zone. They know by now that the story is about The Esoteric Order of the Golden Globe and it's front group the Tristar Parcel and Packet Company, the Archmage Keropus and his Strange Engine, and a plot to create a second sun to power Vivamancy. They know pretty much every dangling hook has turned out to lead back to that plot, even if they weren't immediately sure how. And so they laser like focus on things they see related to that. What this tends to mean is that when plot threads lead them to intersections of one plot and the main plot, they also take the branch that goes back to the main plot - even when they might have personal reasons not to. For example, I had a plot line going with the Cult of Nauti's plot to get the Decamarchy to approve Nauti as an official patron deity of the city of Amalteen where I'd built up a tension between Nauti's high priest and the party cleric, and where I'd introduced a serial killer for them to track, and so forth. But unless I just greased the rails to force them in that direction, they tended to wander away from it whenever that plot line required them to 'go uphill' and do something somewhat hard like "come up with a plan to infiltrate the cult and/or storm their secret temple".
3) Honestly, they mostly want to stay on the rails. Before the campaign started I gave the players a survey/questionnaire regarding what they wanted in a campaign, and collectively they all preferred a game that was further on the spectrum of railroad than it was on the spectrum of sandbox. They want to be taken for a ride, and to a certain extent it doesn't matter what I the GM want here. Basically, after 30 years I think you can largely divide players into two camps. Those that as soon as they see what they think is a hook or a DM cue, bite on as hard as they can and won't let go, and those that as soon as they see what they think is a hook or a DM cue run consistently in the other direction. I'm not sure which group is actually easier to steer, as both groups have a tendency to act erratically against their self-interest just because they think it is cool or because they just aren't thinking about the consequences of what they do.
4) For the first time ever, I'm running a "save the world" plot. And I really have mixed feelings about it, because it really gives the party very little freedom to pursue their own ends. It's big and its epic and at times its cool, and my idea that the whole campaign would be like a chase scene from Last of the Mohicans or Road Warrior is at times playing out well. But wow is it linear to have this one overriding in-world imperative. Sometimes I wish the party had a reason to just stop and explore for a while, and not just at times when they'd lost the thread of the plot and don't know what to do next. For example, one side plot has involved the longest surviving PC's relationship to his family - he was given in to the caring of the temple of the God of Death and raised as a warrior monk (western version, think Knight Templar) at an early age. For the longest time he was trying to discover who he was and why he was given away. Their was this long running gag where everyone recognized him and knew more about him than he did. He eventually discovered that his family was rebel outcasts from a very violent episode in history, and then discovered that they were all a bunch of werewolves and vampires with a plot to take over the country and bring back the worship of The Old Gods. But no one really raised the idea of, "That's cool. We should do something about that." Because, "Save the world first. Save the country later." And it's pretty much the same with any other side plot that comes and goes. If you don't just tie the PC's background down to the rails, in which case, you are railroading the PC every bit as much as if the PCs background didn't matter to the plot, then well, the PC's background doesn't matter to the plot.
5) Most people who think they run open sandboxes don't really. They just run adventure paths where they haven't figured out ahead of time where people are going. But they are actually steering the PC's just as hard as if they had have done so unconsciously by the cues that they give the players and the myth they create as they play. In fact, if anything this "open world" play in my experience is more linearizing than most adventure path play. At least in an adventure path, it's clear when you've got off the rails because the rails are well defined. In my own experience as a player with "open world" play, whenever you exit stage left you enter stage right. With no myth defined for where left, right, or forward leads you, all roads inevitably lead to Rome. If you go left, the DM is like, "Well, I don't know what is to the left, but here is what I think will be interesting." And if you go right, the DM says the same thing to himself, functionally making the choice invalid. The drapes may change on the stage, and some of the props, but the play remains the same. Justin Alexander wrote an interesting piece where he asked if there was any difference between randomly generating 6 encounters and then regardless of what the player choose to do, presenting those 6 encounters in a row and randomly generating an encounter after each of the players 6 choices. We feel like one is different, but are they really?