That legal strategy is most prominently associated with the murder of Matthew Shepard, and it was used in the trial of the murderer of Lawrence King.
Perpetrators of violent crimes against LGBT people are defended under the theory that they committed the crime because of the victim's LGBT identity, so they're not responsible for their crimes.