Well one could ask what purpose does the prison sentence serve to begin with.
Usually the criminal punishment has 3 objectives, prevent immediate harm due to the threat of repeat offenses, rehabilitate the criminal, provide restitution for the victim.
Now prison does protect the public from that particular criminal. Life and longer than life sentences make a mockery of the idea of rehabilitation and apart from satisfying a morally dubious lust for revenge they don't do anything in terms of restitution for the victim.
So it's already a 1/3. While being detrimental to the criminal and society which has to provide for them and justify to itself their mistreatment.
Also it's not as if the state banks upon the "moral obligation" of the criminal. They have law ENFORCEMENT and claim the right to use violence and coercion to make the criminal comply and guard their compliance, whether they consider that their moral obligation or not.
So it's already questionable whether the prisoner has an obligation to stay within the prison and not escape if there is a chance. Like for example in Germany escaping (from prison) isn't even a punishable offense (partially because of a Nazi practice where open doors were used as an excuse for murdering people "killed on the run", rather than "illegally executed"). So it was ruled that the urge not to be locked up is an intrinsic human desire, that cannot be blamed on the prisoner. Though if they damage stuff, harm guards, steal prison equipment and so on, they might still commit a crime.
But suppose the criminal believes in the system, believes that he has done something wrong and accepts the sentence and the sentence is the expression of society and especially the victim and continues to sit in prison till they die.
How would that rebirth work? Like are they the same person? Do they look the same? is "crime" an intrinsic part of their genes or the result of making wrong decisions and being at the wrong place at the wrong time?
Like at least you've established that they have no memory of their past life. So already with that information it would make this pretty weird. Because they would have done nothing wrong. In fact they might not have done anything at all and from their perspective it's absolutely reasonable to assume that you're lying and/or are insane. Like you have no evidence for their guilt, their involvement in the deed, them being the same person and so on. So apart from a "potential risk" of becoming a criminal one day, which isn't even a certainty and might not be higher than that of any other person, there's nothing that makes them a criminal.
So you would essentially lock up an innocent person. Again a very dubious 1/3, though likely even less because you essentially commit a crime against an innocent person as society.
Like in order to feel an obligation you'd need the connection to the deed and if you can't remember that, don't feel like you have committed the crime, don't intend to do it and didn't actually harm someone, why would you isolate yourself from the world? How could you rehabilitate yourself and how could you provide restitution?
And if that is supposed to be an allegory for what if someone loses their mind or some "Ship of Theseus" idea, where "if all your cells replace after x years, are you still the same person who committed the crime and thus responsible for it". Well that would actually be a good question and yeah you kinda are the person on those old photographs at least you've always been with that person, though at the same time you do actually have changed since then so you're no longer that person.
Also culpability is a different question, which is about whether AT THE MOMENT OF THE DEED you were within your means to commit the crime and be able to realize the immorality of that crime. So for example if you were completely wasted drunk at the time of committing the crime, you could end up being unculpable because at the time of the deed you were not able to make rational decisions. Though if you knew your drunk self is violent and you drank anyway, you could be fund culpable for your deliberate decision to drink and risk endangering other people with that.
While if you committed a crime while being clear in your mind and later a concussion wipes your memory or whatnot, you would have been culpable at the time, though this culpability has no impact on who you are now. Like you're in a different situation. Like suppose you're meant to idk lift a weight. You fail. Your trainer tells you to exercise more, you do. Through an accident you lose your arms, is the advice to exercise more still a good idea? It was when it was given, but now the situation has changed and it no longer serves its original purpose.
Same with insanity only being a "get out of jail free"-card if you assume that they fake it, otherwise it's just an acknowledgement that prison isn't helping you and isn't the suitable remedy for your problems and the problems that you cause.
So likely no, but the specifics would depend on more details not given in the setup.