The Reliance of the Traveller, The Classic Manual of Islamic Sacred Law 'Umdat al-Salik, by Ahmad ibn Naqib al-Misri (translated by Nuh Ha Mim Keller), which describes Shafi'i fiqh, classifies these sins.
Summary: There's strong evidence that gay sodomy is an enormity (major sin), while the evidence is less strong for straight sodomy with one's wife. The Reliance classified straight sodomy with one's wife as a "probable enormity".
Gay sodomy is an enormity
p17.0 SODOMY AND LESBIANISM
In more than one place in the Holy Koran,
Allah recounts to us the story of Lot's people, and
how He destroyed them for their wicked practice.
There is consensus among both Muslims and the
followers of all other religions that sodomy is an
enormity. It is even viler and uglier than adultery.
They cite Qur'an 26:165-166: Do you approach males among the worlds And leave what your Lord has created for you as mates? But you are a people transgressing.
They also cite three hadith:
Kill the one who sodomizes and the one who lets it be done to him.
This seems to be Sunan Abi Dawud 4462 [grade: hasan sahih]
May Allah curse him who does what Lot's people did.
This is described as "Musnad Ahmad (1/317) No. 2915, This was classed as hasan by Shu’ayb al-Arna’oot in Tahqeeq al-Musnad" at authentictauheed.com
Lesbianism by women is adultery between them.
For more about this hadith, see Did the Prophet say "lesbianism among women is zina between them"?
Straight sodomy (with one's wife) is a probable enormity
SODOMIZING ONE'S WIFE
p75.20 The Prophet (Allah Bless him and give
him peace) said,
"He who sodomizes a woman is accursed."
I did not immediately find further information about this hadith.
It is later listed as an enormity (twice) in Ibn Hajar Haytami's List of Enormities (within The Reliance):
(258) sodomizing one's wife;
(338-43) fornication; sodomy; bestiality;
sodomizing a woman; lesbianism between women
(meaning one woman doing with another that
which resembles what a man would do with her);
or for a husband to have intercourse with the body
of a deceased wife;