Oh, I'm so sorry that happened. :(
We all try so hard to protect our fish from their natural tendancies... sometimes they manage to do things we'd never expect.
My little red betta female got into her troubles by jumping into a QT container in the main tank, that had another female betta inside. The other fish, already stressed, must have been startled and thought it was being attacked - and attacked the 'invader'.
Most of the little red betta's damage was on her anal fin, which tells me she was at the surface, trying to get back out again while the other fish continued to attack her.
Of course, I was away when it happened, and I felt terrible.
The bettas' curiousity, athletic abilities and aggressive nature work both for and against them... and us, their caretakers.
You did everything you thought would help, and had a 'blind spot' that (under most normal circumstances) wouldn't have resulted in a fish death.
Now, we'll all be looking at our tanks, and thinking about plugging any holes, remembering what a good job you were doing - helping your fish heal - and how fate dealt a cruel blow.