Considering we already kill people and lock them up for life, and obviously consent is not part of that - making it safer for society is, I would have thought that this is a far better alternative, both for the criminal and for society. The way I see it is you're taking away their freedom regardless, and it's not a nice choice, but it's a necessary choice to keep society safe.
Take away their mental freedom or their physical freedom, considering taking away their mental freedom merely allows them to live out the lives that the majority of people in the world do and since they are changed, they won't even miss what was taken away, and taking away physical freedom locks them in a box, which usually degrades them mentally anyway whilst they basically just sit and rot whilst missing out on life, at the countries expense... changing their brain patterns would seem like the lesser of two necessary evils to me by far.