View attachment 295502
https://replay.pokemonshowdown.com/...-1234615862-7miyclpwtxxd8i57iw8nfxofkwfrtzkpw
Hello, in this game, my opponent was able to see i had a Zoroark, without i used it, without damages taken, just when i sent him to the battle. I told it to Mia, who said i can post it here.
Illusion works based on the Pokemon in the 6th slot. So, in Random Battle, Zoroark is set to the level of the 6th Pokemon to make it effective. Dedenne was in the 6th slot in your battle. You swapped Dedenne and Genger, putting Gengar in the 6th slot. Thus automatically revealing you have Zoroark due to its level being different to Gengar. Not a bug; you simply didn't consider how Illusion works.