Esther called Achashveirosh a dog. This was while she was davening for a Yeshua, as she risked her life on behalf of Klal Yisroel to see Achashveirosh who might kill her if he didn’t like her at that moment.
The Medrash sounds like she was petrified, and at the same time she is described as a real Ba'alas Bitachon. Perhaps she called him a Kelev (dog) to show her: בִּיטוּל belittling on him, and that he’s a simple nobody not to be afraid of.
Or else, it was her Madrega in not having the slightest Yetzer Hara for a Melech, despite all the glory that comes along with him. She was called Esther and Hadassa, both Inyanei Tz'niyus, to show a double measure of Tz'niyus, until she killed her Yetzer Hara (calling it a stupid worthless dog). When Dovid was fighting the giant Golyas HaPelishti, he came with sticks and stones, and Golyas said: “What am I, a dog that you throw stones at?” (instead of taking a respectable sword)?
Again, we can say it was Dovid’s: בִּיטוּל belittling and his fearlessness against this giant when he considered him a lowly dog. Additionally, the name “Golyas” means Gilui Arayos, since he was the son of Orpah who had been Nichshal with 100 men, as opposed to Dovid who was on a high Madrega of Kedusha. Chazal say that after his sin with Bas Sheva, he could only kill 800 Pelishtim with one arrow (vs. 1000 before his sin). So we see that his Gevura came from his Kedusha.
And now he considers the foolish Derech of Golyas HaPelishti like a stupid dog. This is the way Yosef was: מְפַטֵּט בְּיִצְרוֹ made a joke of his Yetzer Hara. He made a joke and a: בִּיטוּל belittling of his Yetzer Hara. And Hashem says: אֲשֶר הִתְעַלַלְתִּי בְּמִצְרַיִם He made fun of the Mitzri'im, meaning their: מ"ט שַעֲרֵי טוּמְאָה 49 levels of Tum'ah and immorality.