One thing that seems to be forgotten in this thread is the affect on OTHER grad students. There was a notorious case at Yale in which the department chair, a true star, was having an affair with one of his grad students. From what I’ve heard, there’s no doubt it was consensual. The young woman got her PhD in 4 years–virtually unheard of in that field–and was given a job in the same department on the tenure track. She was also given an important administrative position.
Advisors who are movers and shakers in their field/subfield also have the power to prevent former students from being hired even after allowing them to graduate with PhD.
A college classmate’s father was allowed to graduate sometime in the '60s with a PhD in a highly specialized natural sciences subfield only to find no one was willing to hire him. He later found out his advisor wrote negative recommendations and used his position as the chair of the national fellowship/grant committee for their subfield to compel all subfield departments/programs to not hire him on pain of losing access to those fellowships/grants.
He ended up having to leave his subfield/academia and go into a completely different occupation despite completing his PhD and believing what turned out to have been Machiavellian false words of encouragement, praise, and “being 100% behind him” while actually intending to kill off his career before it could truly begin.
All faculty know, or should know their contractual policies, and firm policies about dating (or rather NOT dating) is typically clearly spelled out. There are many overt and covert power issues. To capture a phrase used in the work environment, you should not get your honey where you get your money.
Just want to point out that such situation is not limited to male-adviser female-student. Several years ago, I had to deal with a female-faculty male-PhD-student relationship in my department. It was not pleasant.