I think the biggest problem is that most of the other games dress up their railroading better. To illustrate my point, here's some gen 1 examples of railroading:
Slumbering Snorlax blocking your way
Boulders and trees blocking your way
Locked doors and elevators that you need keys for
Guards that you need to bribe your way past
Team Rocket invading Saffron
Now here's most of gen 7's railroading:
Some NPC interrupting you every 10 steps with some exposition
Rotom constantly telling you where to go on the bottom screen
A guy setting up a literal barricade and explicitly telling you he won't let you through until you beat X trial
Forcing you through a literal elementary school
Waypoint markers...
Other gens make their linear paths feel like adventures by presenting you with obstacles in the game world and challenging you to explore around and find a way to overcome them. while Sun and Moon pretty much do the opposite and just tell you straight-up where to go and what to do. It's a matter of immersion, really. SM almost never lets you feel independent, which by extension means you almost never get to feel like an adventurer.
This might not be entirely relevant, but another thing that doesn't help is that the plot isn't really about you. Even in gen 4 or 6 with their crazy world destruction plots, it was still ultimately about you being the knight in shining armor. The SM protag on the other hand gets their story hijacked halfway through and becomes a bit player in a story about Lillie's family and the UBs, only a tick above Hau in importance. It really takes me out of an adventure game when I'm not even the main character in my own story.