I think that there is a bug with the order of your team/illusion on zoroark. Sometimes partway through the game I will send out zoroark and it will disguise as a pokemon that isn't in my last slot. Then the visual will switch and the pokemon that it disguised as will swap to last in the order of my team.
Here is an example replay:
https://replay.pokemonshowdown.com/gen8ou-1241325326
In this replay I have regieleki as last in my generic team builder, and I also pick it to be last at the start of the match. You can see on turn 19 I send out zeraora and it disguises as hippowdon. Once I send in the real hippowdon on turn 21, the order that showdown displays swaps and hippowdon moves to last.
This issue doesn't always happen but it feels like it comes up ~10% of the time. Not sure the best way to reproduce
BUG STATUS: NOT A BUG, The order of your team changes constantly depending on what Pokemon you switch in. Therefore, your Pokemon in the last slot will change if you switch it in. You can see the actual order of your party at any time by looking below the moves. (Dawn of Ares)