For any set $X$ we set $[X]^2 = \big\{\{x,y\}: x\neq y\in X\big\}$.

What is an example of a connected graph $G=(V,E)$ and a subset $S\subseteq V$ such that the subgraph $$G[S]:=(S, E\cap [S]^2)$$ is connected, and there is a surjective graph homomorphism $f:G[S]\to G$, but $G[S]\not\cong G$?