Note that v21 is not about forbidden relations. An idea on the juxtaposition here of v21, drawing on the Rashi from Ki Teitzei
Note that the Torah now continues with those relationships that will not lead to offspring. This includes possibly one of the most difficult verses of the Torah for those of us with modern sensibilities; whereas other difficult verses (e.g. calling for genocide of the Amalekites) refer only to their time, the next verse is (sadly) taken (by many schools of Jewish thought) to be just as relevant today.
(א) אַנְדְּרוֹגִינוֹס יֵשׁ בּוֹ דְּרָכִים שָׁוֶה לַאֲנָשִׁים, וְיֵשׁ בּוֹ דְּרָכִים שָׁוֶה לַנָּשִׁים, וְיֵשׁ בּוֹ דְּרָכִים שָׁוֶה לַאֲנָשִׁים וְנָשִׁים, וְיֵשׁ בּוֹ דְּרָכִים אֵינוֹ שָׁוֶה לֹא לַאֲנָשִׁים וְלֹא לַנָּשִׁים:
(1) The hermaphrodite is in some ways like men, and in other ways like women. In other ways he is like men and women, and in others he is like neither men nor women.
רַבִּי מֵאִיר אוֹמֵר: אַנְדְּרוֹגִינוֹס בְּרִיָּה בִּפְנֵי עַצְמָהּ הוּא וְלֹא יָכְלוּ חֲכָמִים לְהַכְרִיעַ עָלָיו אִם הוּא אִישׁ אוֹ אִשָּׁה. אֲבָל טֻמְטוּם אֵינוֹ כֵּן, פְּעָמִים שֶׁהוּא אִישׁ פְּעָמִים שֶׁהוּא אִשָּׁה:
Rabbi Meir says: the hermaphrodite, is [male] a unique [female] creature, and the sages were not able to determine whether he is a man or a woman. But this is not so with a tumtum (one of doubtful), for sometimes he is a man and sometimes he is a woman.
(cf stories of Lot's daughters, Yehudah and Tamar, Rachel and Leah)
וַאֲפִילּוּ לְרַבִּי אֶלְעָזָר ... אֲבָל אִשָּׁה פְּרִיצוּתָא בְּעָלְמָא
And even according to the opinion of Rabbi Elazar ... but [a woman with another] woman is mere licentiousness ...
(ה) חָתָן פָּטוּר מִקְּרִיאַת שְׁמַע בַּלַּיְלָה הָרִאשׁוֹן עַד מוֹצָאֵי שַׁבָּת, אִם לֹא עָשָׂה מַעֲשֶׂה. מַעֲשֶׂה בְּרַבָּן גַּמְלִיאֵל שֶׁקָּרָא בַלַּיְלָה הָרִאשׁוֹן שֶׁנָּשָׂא. אָמְרוּ לוֹ תַּלְמִידָיו, לֹא לִמַּדְתָּנוּ, רַבֵּנוּ, שֶׁחָתָן פָּטוּר מִקְּרִיאַת שְׁמַע בַּלַּיְלָה הָרִאשׁוֹן. אָמַר לָהֶם, אֵינִי שׁוֹמֵעַ לָכֶם לְבַטֵּל מִמֶּנִּי מַלְכוּת שָׁמַיִם אֲפִלּוּ שָׁעָה אֶחָת:
(ו) רָחַץ לַיְלָה הָרִאשׁוֹן שֶׁמֵּתָה אִשְׁתּוֹ. אָמְרוּ לוֹ תַלְמִידָיו, לֹא לִמַּדְתָּנוּ, רַבֵּנוּ, שֶׁאָבֵל אָסוּר לִרְחֹץ. אָמַר לָהֶם, אֵינִי כִשְׁאָר כָּל אָדָם, אִסְטְנִיס אָנִי:
(ז) וּכְשֶׁמֵּת טָבִי עַבְדּוֹ, קִבֵּל עָלָיו תַּנְחוּמִין. אָמְרוּ לוֹ תַּלְמִידָיו, לֹא לִמַּדְתָּנוּ רַבֵּנוּ, שֶׁאֵין מְקַבְּלִין תַּנְחוּמִין עַל הָעֲבָדִים. אָמַר לָהֶם, אֵין טָבִי עַבְדִּי כִּשְׁאָר כָּל הָעֲבָדִים, כָּשֵׁר הָיָה:
(5) A groom is exempt from the recitation of Shema on the first night of his marriage, which was generally Wednesday night, until Saturday night, if he has not taken action and consummated the marriage. There was an incident where Rabban Gamliel married a woman and recited Shema even the first night. His students said to him: Didn’t our teacher teach us that a groom is exempt from the recitation of Shema? He answered them: Nevertheless, I am not listening to you to refrain from reciting Shema, and in so doing preclude myself from the acceptance of the yoke of the Kingdom of Heaven, for even one moment.
(6) The mishna relates another episode portraying unusual conduct by Rabban Gamliel. He bathed on the first night after his wife died. His students said to him: Have you not taught us, our teacher, that a mourner is prohibited to bathe? He answered them: I am not like other people, I am delicate [istenis]. For me, not bathing causes actual physical distress, and even a mourner need not suffer physical distress as part of his mourning.
(7) Another exceptional incident is related: And when his slave, Tavi, died, Rabban Gamliel accepted condolences for his death as one would for a close family member. His students said to him: Have you not taught us, our teacher, that one does not accept condolences for the death of slaves? Rabban Gamliel said to his students: My slave, Tavi, is not like all the rest of the slaves, he was virtuous [Kosher] and it is appropriate to accord him the same respect accorded to a family member.
Liberal Rabbis and Liberal Judaism’s communities delight in celebrating the love of two people, regardless of gender. Marriage has always been a central part of Jewish life. The term for marriage, Kiddushin, comes from the Hebrew word for holiness and marriage is often seen as a way to experience holiness in our everyday lives. Marriage has always been highly valued in Jewish tradition. Traditionally between two persons of the opposite gender and associated in Judaism with procreation, it is now more often entered into as part of a public, legal and – in our case – spiritual cementing of a lifelong loving partnership.
...
Liberal Judaism has changed some aspects of the wedding ceremony to reflect the equal status of women and developed both liturgy and ketubot (marriage contracts) specifically for same-gender and non-binary gender ceremonies.
