If you shoot someone and hit their head killing them or just their ear, its a matter of luck (and possibly skill), the charges are different. The justice system judges based on intent as well as outcome (i.e. execution X luck).
well you're not wrong. That attempted Trump assassination was a few inches away from being in the same books as John Wilkes Booth, instead of being talked about for less than a week and then forgotten. Sentences would have been night and day.
Many jurisdictions have the same punishment for attempted murder and murder though.
I get that there are different views on how much punishment should be based on intent vs outcome. My opinion is factoring in outcome in criminal sentences is often pragmatic, but if we had omniscient judges, judging on intent would be ideal.