And sorry, I searched for this same issue but it didn't come up.
I think I figured out what happened. I think a skeleton shot me before I turned to peaceful, and the arrow kept hitting me when I was destroying the cobblestone tower, but you can never be too certain.
And sorry, I searched for this same issue but it didn't come up.