Yep. AI are stupid. They can't recognize Zoroark when it's Illusion is up. Evidence is in Ultra Sun and Ultra Moon, during the Ultra Necrozma fight, when you lead with Zoroark disguised as a Pokémon 4x weak to Psychic type moves like Toxicroak, Ultra Necrozma will use Photon Geyser on you, thinking that you're Toxicroak, but the "Toxicroak" will be unaffected.