Here's my experience with coming out while in the Navy:
Ultimately, I got discharged for it. I said I wanted to finish my 2 years left before I transitioned, I just wanted to get ready for it before my contract ended. The therapist said she was bound to recommend my discharge. She said that beyond it being regulation (NAVMED P-117, article 15-58), that it would be best for me to stop hiding anyway. However, before she wrote the recommendation for discharge, she put me on limited duty for six months for "depression." She said she was doing that so I had time to process everything and save money before I went home. And while she was completely supportive and did a lot of homework on the issue because of me, she also got it approved for me to see a civilian therapist who had experience with trans clients as I was her first one. About four months later I told her I was ready to move on and she wrote a recommendation to my command for my discharge due to a gender identity disorder diagnosis in accordance with NAVMILPERSMAN 1910-120 and DODINST 1332.14 enclosure 3, 3(

(b)
I was then contacted by the command's personnel office and they asked me to request to separate as it would make it much quicker for me if my separation was voluntary instead of involuntary. I consulted Navy Legal to make sure they weren't trying to screw me by making it voluntary and I was told they were not, and then I spent days in military manuals and instructions to confirm that. I then wrote the request to separate to the CO and made it clear in the remarks that I did not really want this nor did I think the diagnosis inhibited my ability to be a sailor in the slightest, but I had come to accept that this would be easiest for both parties. Four days later the CO granted my request and gave me an honorable discharge.
I was treated with respect by everyone who found out. A nurse who is an O-3 in the Army is the one who convinced me to stop repressing everything and embrace my true self. The Navy therapist I had was also an O-3 and like I said, though she was a bit inexperienced on the subject, put in a lot of effort to support me. Every time I saw her I could tell she spent a lot of time between sessions getting caught up on it and I actually liked her a lot more than the civilian I saw. The security manager (E-7) who I had to disclose to in order to try and keep my security clearance back when I thought I had a chance at staying in was nothing but supportive. While I never spoke in person with the CO, he did give me the honorable, and the one that I actually had face-to-face contact with was a salty old E-9, and he had very kind words for me.
I know that it's likely different between the services. Especially considering I was on a large base with a lot of mental health resources. I have no idea what the USAF equivalent of the manuals and instructions I was discharged under are, but if you think it would be any help I could email some of the letters and forms I have.