Gold-heart games should always be refunded whenever somebody is lynched who was confirmed town, either by:
- claiming a power role that nobody else claims (in the absence of role obfuscation – janitor, tailor etc); or
- providing a reasonable argument that they are clear (having a gun in lylo, hammering mafia in lylo etc).
This should occur when it causes or contributes to a town loss, regardless of whether or not a violation is given.
It's easy to accidentally click the wrong name, or overlook important information and make a stupid decision. It's just as easy to click the wrong name so that your friend wins – or somebody you dislike loses – and then claim it was an accident.
If the lynch was a genuine mistake, then it doesn't matter how much mafia deserved to win, because town deserved to lose even less.
If people abuse this rule, for e.g. lynching the clear to avoid a potential loss, this can be considered gamethrowing by playing in such a way as to invalidate the game.
I don't see any reason this shouldn't be a rule.