It's possible to thank a user for the same edit, twice (or more).
Example: I have the history page, and a specific diff-change, open in separate tabs/windows. If I "thank" in one of those tabs, and don't refresh the other tab, then the second "thank" link doesn't auto-update to "thanked".
Given how rare this situation is likely to be, and how complicated a fix is likely to be (?), I imagine this won't be fixed/fixable. Reporting for record-keeping.
T48690: Duplicate thank you allowed
T58378: Disable thank link while waiting for the server's response, to eliminate one cause of accidental double-thanks.
T61207: Thanks given via mobile are not shown on desktop history page
T88820: Flow thanked posts aren't remembered across sessions - Flow equivalent. The implementations are separate but very similar, so the same cause applies to both.