You are quite right.
A deformation retract is a special case of a homotopy equivalence. Hence, if a subspace was a deformation retract of the space , the two spaces would indeed have the same fundamental group (which they don't in your case).
To show that is however a retract of , you just use the first map that comes to mind, i.e. use the map given by , so you map all of the second copy of to the point