It's interesting you say that because I used to have major issues with my gut (loose stools for 4 years) until I went clean keto about 9 months ago. This really saved my life. It cleared up my hormonal acne, my hair regrew, I had energy again, my brain fog decreased considerably and the loose stools got better.
Basically it gave me my functioning back and i didn't think i was dying anymore. However, I've been on it for 9 months now and still haven't seen a return of my libido and I'm at my wits end with it. I also struggle with my stamina, putting on muscle, facial hair, apathy etc etc so suspect a hormonal problem even though my testosterone values are okay.
May I ask how you sorted your gut issues?