It’s also found in this verse of the Talmud, Ketubot 11b:6:
“An adult man who engaged in intercourse with a minor girl less than three years old has done nothing, as intercourse with a girl less than three years old is tantamount to poking a finger into the eye. In the case of an eye, after a tear falls from it another tear forms to replace it. Similarly, the ruptured hymen of the girl younger than three is restored. And a young boy who engaged in intercourse with an adult woman renders her as one whose hymen was ruptured by wood.”
“An adult man who engaged in intercourse with a minor girl less than three years old has done nothing, as intercourse with a girl less than three years old is tantamount to poking a finger into the eye. In the case of an eye, after a tear falls from it another tear forms to replace it. Similarly, the ruptured hymen of the girl younger than three is restored. And a young boy who engaged in intercourse with an adult woman renders her as one whose hymen was ruptured by wood.”
https://www.sefaria.org/Ketubot.11b.6?lang=bi