Maxperson
Morkus from Orkus
This.How is expressly blocking a players declared, and presumably 100% legal, action, just because the DM doesn't like it, not railroading?
If the DM feels the action is utterly inappropriate and wants to say something before the action resolves? That's usually appropriate.
If the DM believes the player is being deliberately disruptive? That's an out of game issue and needs to be treated as such.
Plus @bloodtide is assuming the player is trying to ruin fun. Perhaps the king has been being a pain in the rear to the group and everyone there is upset at him, and that's just that particular character's way of showing the displeasure. Such a thing isn't always going to be in bad faith.
It will always be railroading, though.