I think speaking in absolutes, especially in a subjective arena like TTRPGs, is always a mistake. Railroading in D&D, and any other system, is an odd topic. It's unclear how you actually decide what is and isn't a railroad without mind-reading. The definition I see floated a lot is that railroading is any decisions by a DM that "ignore player choice." This leads to some very interesting situations when judging what is and isn't a railroad.
We can look at a series of decisions made by a DM during a fork in the road. One side of the decision is prepped, because the DM is certain, in their mind, of the players' choice. The players than surprise that DM and go the other route. Let's look at these and see if we can spot the problem;
First one. The DM planned for nothing to happen on the expected side of the fork. When the other side is chosen, the DM decides to use that same outcome.
Second one. The prep is an Ogre encounter on the expected side of the fork. The players decide to go the other route because the trees are prettier on that side, and the DM decides that the Ogre encounter happens there as well.
Lastly, the DM has a table of random encounters they planned on using for the expected path. When the players chose the unexpected path, the DM decides to use the random table as well.
Here the issue becomes obvious. You can't decipher a railroad on the information provided. Because you don't know if the DM considered the player choice or not. If the DM considered the choice and came to the decision based on that choice, does it matter that the decision is mirrored for both sides of the fork? If the DM doesn't consider the choice in the decision, it is a railroad regardless of the mirrored outcome. The dice in the third example don't change anything, choosing to roll the dice in spite of player choice is the same as any other decision made in spite of player choice.
This becomes more and more clear the more absurd the hypothetical. Let's say the DM prepped to have nothing happen on either side of the fork. But they see the folly in their ways, and at the table, they decide to have an encounter on the side the players choose to avoid looking like it was "an illusion of choice." They changed their mind not becuase of player choice, but because of fear of being called "bad" for railroading. This attempt to avoid the appearance of railroading is railroading.
We see here that to accurately discern a railroad, we need to know DM intent. Since no one, as far as I know, can read minds, I don't know that we can accurately discern a railroad.
So I wonder, does the demonization of the behavior lead to DM's being put in a catch 22. Where they have to start making ever more arbitrary choices to avoid the appearance of railroading. Not because they are railroading, but because on the surface it looks like they might be. Or will ever hostile and more skeptical players demand to look at the DM notes to "verify" they werent railroading?
I'm glad I trust my DM. Not doing so seems like a massive headache.