Jesus was pretty specific about lusting in the heart being the same as the act.
Muslims do believe in Jesus, but I don't know that that was part of it. But I do think that adultery is wrong in the Muslim faith they believed in. Although she wasn't Muslim until much later.
Unfaithfulness has been a trait practiced by the Royal family forever. Both men and women have been unfaithful to their spouses. Rumour is that Prince Andrew is not Prince Philip’s son biologically.
“Furthermore, just as they did not think it worthwhile to retain the knowledge of God, so God gave them over to a depraved mind, so that they do what ought not to be done. They have become filled with every kind of wickedness, evil, greed and depravity. They are full of envy, murder, strife, deceit and malice. They are gossips, slanderers, God-haters, insolent, arrogant and boastful; they invent ways of doing evil; they disobey their parents; they have no understanding, no fidelity, no love, no mercy. Although they know God’s righteous decree that those who do such things deserve death, they not only continue to do these very things but also approve of those who practice them.” Romans 1:28-32 NIV https://bible.com/bible/111/rom.1.28-32.NIV