Another interpretation: "Then Judah drew near unto him" (Genesis 44:18). This is what Scripture says: "One is so near to the other that no air can come between them" (Job 41:8). This refers to Judah and Joseph, for in everything that Joseph exalted himself, Judah came and prevailed over him, as it is said, "And Joseph could not restrain himself" (Genesis 45:1). To what were they alike? To a bull that would go out, and all the beasts fled before him, and he would kick at this one and gore that one. Then the lion came, and the bull did not stand before him; rather, the lion appeared and sought out the bull, but he was not to be found. So too Joseph is compared to a bull, as it is said, "His firstling bull, majesty is his" (Deuteronomy 33:17), and the tribes are compared to beasts. And Joseph would exalt himself over them and kick at them, "and he made himself a stranger to them" (Genesis 42:7); and he gored at one, "and he took from them Simeon" (Genesis 42:24). He did this only until the lion came forth—"Judah is a lion's whelp" (Genesis 49:9). He sought out the bull, but he was not to be found; rather, "And Joseph could not restrain himself" (Genesis 45:1). Why? "The lion is mightiest among the beasts, and turns not back before any" (Proverbs 30:30)—even before him of whom it is written "and he sustained" (Genesis 47:12). So too in the time to come, one anointed for war is destined to arise from Joseph, and the anointed one who arises from Judah is mightier than he, as it is said, "And I will strengthen the house of Judah, and the house of Joseph I will save" (Zechariah 10:6).
Judah the Lion Subdues Joseph the Bull in Vayigash
Midrash Tanchuma Buber, Vayigash 3:1
ד"א ויגש אליו יהודה. זש"ה אחד באחד יגשו ורוח לא יבא ביניהם (איוב מא ח), זה יהודה ויוסף, שכל מה שנתגאה יוסף בא יהודה ונצח אותו, שנאמר ולא יכול יוסף להתאפק (בראשית מה א), למה היו דומין, לשור שהיה יוצא והיו כל החיות בורחות מפניו, והיה בועט לזה ומנגח לזה, ובא האריה ולא עמד לפניו, אלא נראה הארי ובקשו לשור ולא נמצא, כך יוסף נמשל בשור, שנאמר בכור שורו הדר לו (דברים לג יז), והשבטים נמשלו לחיות, והיה יוסף מתגאה עליהם ומבעט אותם, ויתנכר אליהם, ומנגח לזה, ויקח מאתם את שמעון, לא עשה, אלא כיון שיצא הארי, גור איה יהודה (בראשית מט ט), בקשו לשור ולא נמצא, אלא ולא יכול יוסף להתאפק, למה, ליש גבור בבהמה ולא ישוב מפני כל (משלי ל ל), אפילו מפני שכתיב בו ויכלכל. אף לעתיד לבא משוח מלחמה עתיד לעמוד מיוסף, ומשוח העומד מיהודה קשה ממנו, שנאמר וגברתי את בית יהודה [ואת בית יוסף אושיע] (זכריה י ו).