Let's say i have a Porygon2 and the opponent sends out a Zoroark but, it's illusioning a Regigigas. Will Porygon2 get the ability Slow Start or Illusion?
Trace copies the Ability of the current opponent. Trace is able to copy Wonder Guard, but not Multitype or Illusion. If both the Pokémon and the opponent have Trace, it will do nothing.
You can't Trace Illusion.
-Bulbapedia
Zoroark still keeps its ability while Illusioning. Porygon2 will not get an Ability and keep Trace, because Illusion cannot be copied.