Yeah, I believe Leonardo Da Vinci was arrested a couple of times because of sodomy, but because 3/4 of Florence's population were also pretty LGBTQ+, they just let it slide.
In fact, the German-language term "Florenzer" (derived from the name of a person from the city of Florence) is a derogatory insult for gay people because there were THAT MANY gay people in Florence during the Renaissance, if I remember correctly.