If one is in an intimate relationship with another person, one is attached to them. The Piyavagga says:
From endearment springs grief, from endearment springs fear. For one who is wholly free from endearment there is no grief, whence then
fear?
From affection springs grief, from affection springs fear. For one who is wholly free from affection there is no grief, whence then
fear?
From attachment springs grief, from attachment springs fear. For one who is wholly free from attachment there is no grief, whence then
fear?
https://www.accesstoinsight.org/tipitaka/kn/dhp/dhp.16.budd.html
Above & below, Buddhism teaches any engaging in sensual intimacy is attachment:
Now delight in feelings is clinging/attachment.
https://suttacentral.net/mn38/en/bodhi
One is attached to another person when, if that relationship ends, one feels alone. One feels something missing or incomplete in their life. This sense of loss is called 'hurt'. It is emotionally painful. The Piyavagga says:
From attachment springs grief, from attachment springs fear. For one
who is wholly free from attachment there is no grief, whence then
fear?
Buddhism teaches to avoid hurting others, as follows:
This act I am
doing leads to hurting myself, hurting others, or hurting both. It’s
unskillful, with suffering as its outcome and result.’ Then, Rāhula,
you should desist from such a deed.
https://suttacentral.net/mn61/en/sujato
This means 'duty' or 'obligation' in respect to right behaviour is required in relationship (rather than 'unconditional love'). For example, the Buddhist scriptures teach a husband has five duties or obligations towards his wife and, upon performing his duty, the wife returns her love in five ways, as follows:
In five ways, young householder, should a wife as the West be
ministered to by a husband:
(i) by being courteous to her, (ii) by not despising her, (iii) by
being faithful to her, (iv) by handing over authority to her, (v) by
providing her with adornments.
The wife thus ministered to as the West by her husband shows her
compassion to her husband in five ways:
(i) she performs her duties well, (ii) she is hospitable to relations
and attendants (iii) she is faithful, (iv) she protects what he
brings, (v) she is skilled and industrious in discharging her duties.
In these five ways does the wife show her compassion to her husband
who ministers to her as the West. Thus is the West covered by him and
made safe and secure.
https://www.accesstoinsight.org/tipitaka/dn/dn.31.0.nara.html
In other words, the love of a wife & husband, in Buddhism, is conditional. One condition of a husband/wife relationship is each is sexual faithful.
If husbands & wives are not sexually faithful to each other, the relationship will generally inevitably fall apart. The Samajivina Sutta says:
If both husband & wife want to see one another not only in the present
life but also in the life to come [in the future], they should be in tune [with each
other] in conviction, in tune in virtue, in tune in generosity, and in
tune in discernment. Then they will see one another not only in the
present life but also in the life to come.
https://www.accesstoinsight.org/tipitaka/an/an04/an04.055.than.html
Therefore, it generally won't help maintain a relationship if one partner attempts to unconditionally love an unfaithful partner. Instead, by attempting unconditional love, one partner is often enabling the bad habits of the unfaithful partner. The scriptures call such a situation "wretchedness", as follows:
Here, the husband is one who destroys life, takes what is not given, engages in sexual misconduct, speaks falsely, and indulges in liquor, wine, and intoxicants, the basis for heedlessness; he is immoral, of bad character; he dwells at home with a heart obsessed by the stain of miserliness; he insults and reviles ascetics and brahmins... but his wife is virtuous,
charitable, generous. She is a female deva (goddess; angel) living with a wretched
husband.
https://suttacentral.net/an4.53/en/bodhi
At least in relation to a wife, the scriptures say an immoral wife can be expelled from the family home of the husband, as follows:
If a female has the powers of attractiveness, wealth, relatives, and
children, but not that of ethical behavior, the family will send her
away, they won’t accommodate her.
https://suttacentral.net/sn37.30/en/sujato
Similarly, Buddhism teaches parents have five duties towards their children, which include restraining their children from doing evil (harmful/hurtful) things and nurturing their children to do good. It follows the love of parents towards their children in Buddhism is not unconditional. It is conditional, as follows:
In five ways, young householder, the parents thus ministered to as the
East by their children, show their compassion:
(i) they restrain them from evil, (ii) they encourage them to do good,
(iii) they train them for a profession, (iv) they arrange a suitable
marriage, (v) at the proper time they hand over their inheritance to
them.
In these five ways do children minister to their parents as the East
and the parents show their compassion to their children. Thus is the
East covered by them and made safe and secure.
https://www.accesstoinsight.org/tipitaka/dn/dn.31.0.nara.html
For example, if a child wishes to engage in drug taking, sexual orgies & other evil deeds in the family home, the duty of parents is to restrain their children. It is not to unconditionally love children so the children of the family are free to take drugs & have sexual orgies in the family home.
For example, in the scriptures, there is the story about an unethical misbehaved wife. The Buddha, who was visiting the family home, tamed the wife, as follows:
Householder, what’s with the people making that dreadful racket in
your home? You’d think it was fishermen hauling in a catch!
Sir, that’s my daughter-in-law Sujātā. She’s been brought here from a
wealthy family.She doesn’t obey her mother-in-law or father-in-law or
her husband. And she does not honor, respect, esteem and venerate the
Buddha.
Then the Buddha addressed Sujātā, saying, “Come, Sujātā.”
“Yes, sir,” she replied. She went up to the Buddha, bowed, and sat
down to one side. The Buddha said to her:....
https://suttacentral.net/an7.63/en/sujato
In conclusion, there appear to be no teachings in the Buddhist scriptures that say, in the context of vital co-dependent social relationships, you can truly love someone with no attachment so that no matter what they do you do not end up suffering.
The Metta Sutta, about unconditional love, says:
This is what should be done By one who is skilled in goodness, And
who knows the path of peace...
In other words, the Metta Sutta appears to not recommend the practice of unconditional love to those who are not skilled in goodness.