Imagine that after the events of New York, Frigga manages to convince Odin that they alone, as parents, should decide Lokis punishment, with Thor as a witness and support as a brother.
At first Loki is defensive, claiming that he isn’t their child or brother, but his love for Frigga makes it easier for him to cave in. He only has one demand though, that by whatever judgment they’ll give him, he will be allowed to change into his female form (think Katie McGrath) and stay that way from here on out. Loki explains that he wants a new chance, but that his male form will forever be linked to his crimes and fault.
Odin thinks this is Lokis way of receiving a easier punishment, as being a woman is often seen as weak. So he says he will only agree to this demand, if he is allowed to see Lokis female form, as he as never seen it before and Loki obliges. To his surprise, Lokis female form does not look like a weak woman, but fierce and cunning, just as his male form. Pleased with this, Odin sees no problem of handing out his original punishment, working with the Avengers, but also helping New York city to rebuild all that was ruined during his attempt at taking over.
Thor and Frigga are they only ones who have seen Loki in both male and female form, so neither have a problem with this transition. After all, it was Frigga who taught Loki how to behave as a proper woman and Thor has in the past, witness Loki causing mischief and getting away by simply changing into a woman. There was also that one time Loki flirted with Fandral, but no one still knows for sure how far that went as neither refuses to say anything, but the rumors however…
When Loki arrives at The Stark Tower, with Thor, the Avengers are confused at first who the woman is, but when Thor proudly explains that it is his sister, Loki, here to start her punishment, they’re met with even more confusing. Steve is the one who voices his confusion first, as he has never met someone who can literally change form like this. Loki, being the little trickster that she is known for, can’t help but flirt with Steve, just to show that she is very much a woman and that she expects every one to treat her as such! Imagine how surprised everyone is, when Steve apologizes to her, but also reminds her that she is there for a reason, no matter her form.
As a woman, Loki does get away with more than as a man, but she also has to instead deal with unwanted attention. Thankfully, Steve is there to help when such occasions happen and by doing this, it doesn’t come as a surprise that the two of them become close.
Up to the writer to decide whether they become lovers, or just very good friends.