How did contemporary politicians justify this?
There is always more to be said on the subject but you may be interested in this recent thread which discusses the different treatment of men and women, at least until Victorian times. https://www.reddit.com/r/AskHistorians/comments/glvead/according_to_the_victoria_and_albert_museum_queen/
Very briefly, neither lesbianism nor homosexuality as an identity were illegal. The offence involved was the act of "buggery or sodomy" and the way the act was legally defined made it difficult to charge women.