Just curious
It is actually impossible for a Pokemon holding a Mega-Stone to lose its item in-battle. If the Pokemon with the stone uses a move that would remove its item (such as Fling), it will fail. If the opponent uses a move that would remove the target's item (such as Knock Off), it will behave as if the target isn't holding anything. This is true before and after Mega-evolution, and also applies to Z-crystals.