https://replay.pokemonshowdown.com/gen6randombattle-2574242165
If you use Knock Off and die as a result of the move (rocky helmet damage), the item stays on.
If you use Knock Off and die as a result of the move (rocky helmet damage), the item stays on.