In Shemot 2 Paro's daughter Batya takes three-month-old Moshe from the water, speculates that he is a Hebrew child, and decides to adopt him. She then has Miriam find a wet-nurse (Yocheved) to take the child away until he's weaned; it's unclear how immediately this happens, because according to Rashi (citing Sotah 12b and Sh'mot Rabbah 1:25), they looked for an Egyptian wet-nurse first. So Batya might have had the infant for some time or not, but in either case became his adopted mother when he was weaned probably a couple years later.
Meanwhile, Paro had this decree against Hebrew male children.
How did Batya explain having this child to her father? We know that the child wasn't a secret from Paro because of the midrash where Moshe takes Paro's crown, the advisors suggest testing him to see if he's a usurper, and he passes the test and thus isn't killed.
I can think of a few possibilities, but couldn't find any commentaries that support any of them:
Batya spent a couple years not in close contact with her father, so that she could credibly say that the child was her own. This means passing Moshe off as Egyptian, and also raises a question about claimed paternity.
Batya had actually been pregnant, miscarried, and made a substitution. This too means passing Moshe off as Egyptian.
Batya admitted that the child wasn't hers but persuaded Paro to let her keep him anyway. Maybe she passed him off as Egyptian, or passed him off as older (born before the decree), or argued that he couldn't possibly be their savior because she was going to raise him right.
Batya had enough power to simply adopt the child regardless of her father's wishes.
As I said, that's all unsupported speculation. What actually happened, according to our tradition?