Yes, that scene is 2 Kings 23:7. The longstanding tradition of viewing such women as “prostitutes” in a sexual sense was shocked by 20th century scholarly discoveries that sacred prostitution was not in fact a feature of the ancient world in the way Christianity had said. Assessments like this, in Esther Marie Menn’s Judah and Tamar (Genesis 38), are common in scholarly literature:
“There is no evidence that this cult functionary participated in any form of ritual sexual activity, such as sacred prostitution or reenactment of a hieros gamos. The new understanding of the Akkadian qadistu therefore reopens the question of the Hebrew term’s meaning.”
Likewise, the Christian idea that Corinth was overrun with sacred prostitutes—really a hoax since there was never evidence for it—challenges the interpretation that sex was the subject of Paul’s “sexual” teachings. Rather, in the ancient world, as in Jewish spirituality, God & humans are understood to be “married” and worship is given sexual reference.