When a woman contributes her part to a conceived baby,
it is by way of her ovum which contains not the woman's entire DNA,
but only half of her DNA.
This half is made from her own two strands,
(Human DNA is diploid.)
and is composed of parts from
either her father or from her mother. All her ova (eggs) are different because they take on different parts of both strands.
So Jesus did not have the entire DNA of Mary, only half: only those chosen for that particular ovum/egg.
(He couldn't, anyway,
have her whole DNA because He was male and she was
female---quite a difference.)
These videos give excellent explanations of Jesus' DNA:
Click
HERE for short video on Jesus' chromosomes
Click HERE for a longer video.