Similar levels of intelligence have been seen even in switched-at-birth twin cases where one twin is raised by one family and another by another. The IQ between the twins was in every case more correlated than the IQ of each twin and their family-siblings. Look up the interview with Nancy Segal on YouTube about Twin Studies and IQ.
They controlled for environment by considering the difference between non-twin siblings (< 2 years apart in age), fraternal (two-egg) twins, and identical (single-egg) twins. The correlation in intelligence between non-twin siblings and fraternal twins was similar, and both are significantly lower than the correlation between identical twins. The most plausible explanation for this is the genes that identical twins share.