Some of it depends on how they're written. Ken & Robin's big campaigns like Dracula Dossier and Armitage Files are written in a way that there is literally nothing that the players can do to invalidate the books.... Now, please note the specific wording there. There's never a set path that has to be taken, not even as to which role NPCs fill. They're written with three different entries, so regardless of if the PCs view them as Allies, Villains, or Neutral, there's a framework to build on. Locations aren't tied to a timeline, so they're relevant regardless of what order the PCs choose to visit them.
And, even if the player's go somewhere other than where the adventure planned for them to do doesn't make the rest of the book useless. You can reskin things to use the mechanical aspects and reduce the need to come up with them on the fly. Your players may wander back into the story from a different entry point, later on.
But.... I do think that Railroading gets.... misused. And, I am not suggesting that you are doing so here... Just something that came to mind as I was considering this. Railroading, to me, is when the GM artificially constrains the choices on the players. So, as a counter example, your classic super dungeon has a fleshed out map. That's going to constrain the choices that the players can make. If the corridor only turns right, then the players can't opt to turn left. But it's not an artificial constraint. If the corridor has both options and the players want to turn left, and I say
No, you have to turn right!" that's railroading. Offering up a "script" that the players willingly follow is just as good as one that they reject out of hand and do their own thing.
Last, presuming that you don't pull some sort of bait and switch, that you are completely upfront with your players.... They're kinda being jerks if they UTTERLY refuse to engage with the adventure. They should have been adults and just told you that they weren't interested. And I mean Utterly... Not just came up with a creative take on how to interact with it.... If you offer to run the Temple of Elemental Evil modules for them, and they tell you that's cool, but then say, "Screw you, we're opening a bar!" they're kinda being jackasses. They should have just told you that they weren't interested in that.