One open world game, where you did end up in the prison after being arrested, was American McGee's Scrapland, but even then the purpose of that section was to give you a chance to escape. Obviously in the world less wacky then Scrapland, I don't think something like that could happen, with you just running out of prison and enjoying your freedom without anyone bothering you. While the idea of a different kind of punishments depending on the crimes commited and the simulation of prison life sound appealing, it would require a huge amount of resources for a feature that majority players will try their damnest to avoid and of course you can't expect V to sit idle in prison for months or years, otherwise it would no longer be Cyberpunk 2077, but Cyberpunk 2078, Cyberpunk 2079, Cyberpunk 2080, Cyberpunk 2081, Cyberpunk 2082, Cyberpunk 2083 and so on in one game. So while I think it is a nice idea in theory, I don't think it would work in practice.
Though to be honest, I have no idea what kind of repercussions could potentially await us other then game over after being arrested. One way it could potentially work, would be similar system to the one we witnessed in original Mafia, where intensity of police actions changes depending on the crime commited. For a minor offences they make you pay a fee, for a somewhat bigger illegal activities (like trying to run away from paying the fee) they will make an arrest, but for a serious crimes, like killing some innocent bystanders, they're no longer trying to arrest, but put you down right away. Something like that can work in Cyberpunk 2077, with minor crimes getting penalized with a fee (or a bribe), somewhat bigger offenses like beating the crap out of someone with a short time arrest (or bigger bribe), but for a senseless murders the police is no longer thinking about handcuffing you for life, but instead about taking dangerous psycho like you down, thus penalizing you with death (or the BIGGEST... No, I don't think that would work anymore).