There is a pretty straightforward solution. I'll leave to the reader whether or not it is a good one.
Redefine the crimes so they are easier to prove. In many cases that is going to involve moving from a mens rea (guilty mental state) of intentionally to recklessly, negligently or even eliminating mens rea altogether and just requiring an actus reus (guilty act). In some cases that might mean criminalizing more acts of omission instead of requiring proof of an overt bad act.
I want to be clear that this wouldn't be costless. It goes against much our existing framework for what makes people criminals. It would increase the chance that someone who made honest mistakes would be criminally punished. But remember Blackstone said that it is better for ten guilty men to go free than one man suffer, not one hundred, not one thousand and certainly not all the guilty men. And he was writing in an era when all felonies were capital crimes.
A small percentage of murderers getting off on technicalities is something a society can live with, even be proud of in a strange way, but when the exception swallows the rule that society is playing with fire.