When mining and being attacked, sometimes your character draws its weapon and for some reason this results in you mining ruined ore chunks or ruined logs as if you didn’t have the appropriate level tool while still using up your gathering tool and depleting the node. I can’t imagine why this would be intentional so it must obviously be a bug.