That is the general plothole in all TR face-offs, rather than making a high tail for HQ or some other communication for Giovanni, they stop in some random bit of forest to gloat, some area perfect as a ground for the twerps to find and kick their asses. The one case they avoided this of course was the case they caught Yanma.
The Z Moves I tend to excuse because they usually need to happen when the character has an opening, and Ash's lot were getting bombarded at that point with him having to focus on two of his Pokemon at once at that. I can kinda excuse this as the reason Ash doesn't just bring out all his Pokemon at once against TR every time because focusing on all them would be convoluted and easy to exploit.
The Alolan Meowth episode I put on higher ground because, while some of the standard plot armour cliches and 'enforced stupidity moments' had to occur (similarly Ash and ONLY Ash fought them, when they had TR outnumbered six to two, again happens every series), they were at least downplayed to the point the twerps had to exert some actual effort and wit into stopping them, not winning the same two boring ways of automated curb stomp or dumb luck. It's still kinda barebones compared to some face-offs in previous series though (even their villain decay era days had the odd REALLY good face off like Do I Hear A Ralts and The Stolen Stones where the twerps had to throw nearly everything at them).