Imprisoning player characters can take away agency from the players, no question. Game masters can certainly present this to the players, but should be careful not to take it too far. Take it too far and players will get frustrated and ruin a game. Just getting the player characters into a prison situation may be a challenge. How about running an rpg set inside a prison? Well, that’s just madness that might present a great game.