Explain yourself. The anime has given us no reason to believe Iris is a weak trainer or battler. She was considered a child prodigy and got a Gym offer based off two battles as well as a 99 winning streak. It’s funny how you’re implying that Gary is a “better” person for Ash to loose to when said person already got beat by Ash in a 6 v 6 battle and a type disadvantage. Not to mention Gary took time off from being a trainer to do research while Iris has actively been a trainer since she left Ash. I smell bias. Also I wish y’all would stop basing other characters accomplishments and development off of Ash as if they’re not their own characters and simply exist to boost him up.
1. In the Pokemon series as a whole, in terms of main characters, Ash has always been the main "Pokemon Trainer", essentially the strongest of the bunch in terms of talent for battling. If Iris was Ash's rival in the Unova region, that would be an exception but she wasn't. While you could say that she is definitely stronger than most of Ash's travel companions, not once was she shown to be much superior to Ash and considering the fact that Unova Ash is probably the most incompetent version of Ash (Disregarding Kanto where he was still a rookie), this further adds to my point.
2. Iris's 99 win streak doesn't really mean anything. Do you remember A.J back in Kanto who had a 100 win streak with his Sandshrew. Whatever happened to him lol.
3. Gary was also considered to be a Prodigy and most importantly, he was someone who was considered to be "Superior" to Ash. This is the key point. Iris was never shown to be more talented or in general be someone who Ash would have to surpass to beat. If anything, she was shown to be inferior to one of the most incompetent versions of Ash. Gary on the other hand, was always considered to be superior. Even during their match in the Johto League, Gary had the upperhand almost throughout the battle and only finally lost due to Ash's unique creative style of battling. And for the record, even if Gary decided to take a break from battling, did you forget that this same Gary defeated post battle frontier Ash with his electivire effortlessly? And with regard to your argument about Gary losing with type advantages, when has that ever mattered in the anime lol?
This has nothing to do with bias. If Iris was Ash's rival in the Unova region, it would be one thing but she wasn't. Also, this is a series which is trying to essentially bring Ash to a Regional Champion tier trainer. Even if Ash loses to Leon, him getting to the Master Class should essentially make him definitely Elite four tier if not Regional Champion tier considering the fact that even someone like Lance is a part of the Master Class.
If Ash loses to Iris at this point, it does demean his character growth so far and spoils the narrative. The one who is biased in this scenario as you as evident by your profile picture. Whether you like it or not, Ash is the main character and while I do agree that the other characters deserve their own accomplishments and success and their own stories, their accomplishments shouldn't be spoiling the main narrative which is Ash's story.
I would be glad to see Iris defeat Drayden in a rematch or maybe even her become the regional champion in the future and challenging Ash ("Assuming Ash becomes the Pokemon World Champion"). But her getting there before Ash spoils the narrative.
And as for why this is okay with Gary simply has to do with Gary's character in the narrative.
1) He was Ash's "RIVAL" and someone much superior to him almost throughout the series.
2) He was shown to be a very competent battler and now also, has the research experience that adds further merit to his battle IQ.