That probably depends on the metaphysics of the system/setting. If the soul/spirit has a metaphysical presence and reality, and is the thing that actually lasts for eternity (or some significant fraction thereof), then maybe the mind is, on the scale of things, perhaps only as relevant as the flesh, which we know will decay eventually.
But is someone truly "good" if they only act good because they're forced to be good? Is there a tipping point between direction and overriding?
In theory around 1% of people are sociopaths*. However, they make up 45% of the prison population. So if you could find those people and somehow modify their brains, could you and should you?
One option is to just put the equivalent of a shock collar on them, similar to a "geas". If they do something we want to prevent they get zapped. Doesn't change the person but prevents them from harming others. Unfortunately "geas" in 5E isn't really that powerful for more dangerous creatures. Not only would it have to be refreshed on a regular basis (unless cast at 9th level) it isn't much of a deterrent.
But what if you could give them drugs or perform neurological surgery to rewrite their brains? This is something that a lot of speculative sci-fi has dealt with. If you rewire someone's entire outlook and personality are you killing the person they were before?
Anyway the topic is interesting and kind of (sort of) makes me want to go back and watch A Clockwork Orange again ... but it's nothing that's ever going to be resolved.
*this is debated, and I'm not using scientific terms.