I often state that, while the precepts of #Buddhism are "training rules" (i.e. not absolute commandments), and while the raft of the Eightfold Path should be left behind once one has reached the other shore (Nirvana), acting in line with the precepts may indeed come "naturally" to the Enlightened ones. They would thus behave "morally," without "following" moral rules. Here is why, in relation to the third precept for lay Buddhist people…
The precept states that one should "refrain from sexual misconduct." Many interpretations has been given to what misconduct is or isn't. The sūtras basically mention having sexually-tainted interactions with someone "under the protection" of another, be it by birth (parents…) or by vow (marriage, ordination…): "(…) one has intercourse with those under the protection of father, mother, brother, sister, relatives or clan, or of their religious community; or with those promised to someone else, protected by law, and even with those betrothed with a garland."
As noted by some, this definition does not condemn homosexuality, it does not condemn pre-marital sex for responsible 18+ adults in societies where they're freed from the protection of their parents… It potentially doesn't condemn non-consensual sex either (if one limits oneself to the "under protection" part), but non-consensual sex would obviously fall under the second precept urging not to take what is not given (and under the first precept urging not to kill but generally interpreted as not to harm)… Some people indeed consider that the precept about sexual misconduct is superfluous when the other four precepts for lay people are adhered to. Monastics have much stricter training rules than lay people.
There is no 'sin' in Buddhism; there's no supreme authority defining what's right and wrong. However, simple facts are: we all want happiness and we're inter-connected. We don't live independently of one another, so there's no way to be happy at the expense of others: creating hatred, envy, jealousy, resentment in others will surely constitute seeds of our future unhappiness. But since we all want happiness and we are inter-connected, no one really needs a God to tell us what is wholesome and what's not; it's naturally limpid and the risk we face is ignorance obscuring this clarity (e.g. believing in our 'independent' existence — leading to selfishness, a tendency suddenly 'making sense' if one can stay separate from the others). Clarity in these two facts — all wanting happiness & inter-connection — explains why the first precept is interpreted as no-harm rather than just no-kill, it also explains why one shouldn't take what is not given, etc. Deeply understanding just these two facts is enough to dispense from the rules (as one would have personal standards beyond what any list of rules could ever provide, no matter how long).
Some schools of Buddhism state that Nirvāṇa is reachable by all beings, some schools would consider that one cannot reach Enlightenment without becoming a monastic (at the latest, right when Enlightenment is reached) at the "risk" of dying (in quotation marks because an Enlightened person has no aversion toward dying). I personally believe Enlightenment is reachable by all, and that Nirvāṇa is unconditioned: Nirvāṇa is actualised thanks to wisdom, and it does not depend on particular fixed conditions (even if some conditions are definitely more supportive than others in order to develop wisdom, hence the positive value of moral conduct as part of the Path).
Liberation is getting free of hatred, passion, and ignorance. One could as well say "getting rid of ignorance" only, because hatred and lust are based on the illusion that our happiness depends on something independent from us, an 'objective source' of essential happiness, be it in acquiring something (or someone) or in pushing it so far away we would be 'sure' not to even think about it anymore ever…
So, once Liberated, how would a lay person behave? The burning desire is extinguished, but not the ability to respond or even to feel.
Guarding the sense doors, the key point is that what one feels would no longer lead to mental constructions such as "if I experience that feeling, then I'm satisfied, hence it makes sense to seek experiencing this feeling again." Such mental construction always forgets conditions, details, circumstances that makes the rule simplistic and untrue; that's ignorance! Such mental construction easily forgets that the source of pleasure cannot be independent or permanent; it forgets that "having sex with a new partner is pleasurable" is clearly not true if a spouse suddenly appears during the act; it forgets that caresses become painful if the rubbing is always exactly on the same spot… No rule can address the ambiguity and sheer diversity of life; rules are just always too simple. The key point is: Liberation is in freeing one from such endless making of mental constructs (constructs which inevitably become painful when broken, because we identify with them (hence we are broken)); this is the cessation of #karma (hence of suffering).
The key victory in Liberation is over ignorance: one doesn't believe anymore that acquiring something, anything, will bring lasting satisfaction. Or even that satisfaction once means satisfaction another time. One will not link an internal feeling with an external source. Or believe that the source of a feeling can be isolated (made independent) from the rest of circumstances and conditions.
It is not that (sexual) pleasure would no exist longer. The Liberation is about no longer believing that having sex would change one's life. So: if it comes, no big deal; if it doesn't, no big deal either… This is enough because, from there, one would not have anything sexual going on with a married person (the archetypical misconduct): without the illusion that sex is 'required' for one's happiness, without the illusion that sex with someone else would have something better (if only an exit from 'boredom' thanks to newness), without the illusion that more sex or other forms of sex would bring happiness, one would simply not seek happiness in such venues. In relation to seeking multiply partners, one would see that sexual pleasure is essentially individual (how is having sex with one different from having sex with another, really, once one takes a step back?), one would also see that seeking multiple partners is a misguided attempt at defining / solidifying / fulfilling a 'self' that one can never pin down…
The Dalai Lama notoriously refused to condemn some tantric practises between male Tibetan 'masters' and their female 'students', but he nonetheless said not to trust a 'master' without deep enquiry first. His main criteria was that someone really detached could have feeling but would not let such feeling lead to mental constructs, preferences, tendencies and ultimately 'thirst.' The example he chose was about food and the master showing no preference for other food if presented with fæces… Another example would be to note that nothing is said about gender in "if sex comes, no big deal; if it doesn't, no big deal either…" As long as one defines himself / herself as "heterosexual" or "homosexual" or whatever else, there's no Liberation yet (some insights may have been experienced, of course, but the journey goes on…): such self-definition seriously relies on a belief in a relatively-fixed 'self' and expresses strong preferences, tendencies, which clearly suggest the reaction to new circumstances would not be free (from previously 'programmed' tendencies). Hence, if a 'master' shows a strong preference for young beautiful female students only, then maybe one is entitled to take any enlightenment claim with a pinch of salt… Higher abodes are form-less (hence gender-less).
Hence an Enlightened person would naturally behave according to the precept, not from following "rules" but from seeing that impermanence affects sexual perceptions, that no source of pleasure can be isolated from the other conditions, and that no pleasure can be linked to a 'self' when no 'self' can be pinned down… Without delusions about what sex brings to one's life, there is no more desire for sex than there is aversion (which is not enough in itself to e.g. break a vow of celibacy, but that's due to the nature of taking a vow rather than the object of the vow). Without desires, there's no 'seeking', and any response to unsolicited 'seeking' by some ignorant other would be of no-harm (i.e. would prevent the other from hurting themselves). No-harm is only 'Enlightened selfishness,' avoiding to sow seeds of future 'retaliation;' it doesn't need a God's command. That's enough to make one behave accordingly to the precept without even attempting to.