I am searching for a $T_1$ space $X$ which deformation retracts onto a non-closed subspace $A$. Such a space cannot be Hausdorff as any retract in a Hausdorff space is closed.
I tried some spaces, for example the unit interval with two origins (take $[0,1]×\{0,1\}$ and identify $(x,0)\sim(x,1)$ for $x>0$) and the subspace $A=X-\{(0,1)\}$. Although this is a retract - map $(0,1)$ to $(0,0)$ - it is not a deformation retract.
Note that if $H:X×I\to X$ is the homotopy with $H(x,0)=x$, $H(x,1)=r(x)$ and $H(a,t)=a$ for all $a\in A$, and if $x\in\overline A$, then $H(x,t)$ must be a point in $\overline A$ for every $0<t<1$, and if $H(x,t)\in A$, then $H(x,t)$ and $x$ cannot have disjoint neighborhoods.
Do you have any idea?
You can just refine your counterexample, for example take $[0,1]\times [0,1]$ and identify $(x,t)\sim (x,u)$ if $x>1$ (for any $t,u$).
The quotient space $Y$ that you obtain deformation retracts onto the projection of $[0,1]\times\{0\}$ to the quotient, which is not closed.
Note that you can use the obvious deformation retraction $[0,1]\times [0,1]\to [0,1]\times\{0\}$ and the fact that a deformation retraction on a topological space induces a deformation retraction on a quotient (this is well-known but non-trivial), which in this case is easy.