You could commit a crime then claim not to remember. How could it be proven otherwise? If the science exists to know for a fact that you don't remember a specific event then the science likely exists to also wipe that event from your memory. You could commit a crime then deliberately wipe your memory of it to escape punishment.
Philosophy
Discussion of philosophy
Maybe in extreme cases where someone has a traumatic injury after the crime it could work. On the flip side we right now has police interrogations where they convinced someone that the did commit a crime. Shouldn’t the people who don’t remember get the same amount of leniency as those who are convinced they did commit a crime? Personally I am not sure what I believe would be the best answer but there are always cases the will lie on the line or in a gray area.
The short answer is yes, people should get punished for crimes they don't remember.
Punishment for crimes is dictated by the action, the effects, and sometimes the intent. These things tip the scales differently depending on the specifics of a case. So what a person remembers or doesn't remember is largely irrelevant to the law.
necessarily if they did it, they possess the same identity as before; they are the same person who is guilty, even if they are not the same person who was previously unrepentant or now possesses no knowledge of the crime or intent
morally in a way before God in a Christian view I think they may not be able to "merit" further punishment if they are not of a sound mind