Houghton's group $H_3$ (see Section 5.3 here for a definition) is (locally finite)-by-$\mathbf{Z}^2$, which easily implies that all its finitely generated subgroups are Hopfian. (Not all its subgroups are Hopfian: it admits an isomorphic copy of $F^{(\mathbf{N})}$ as a subgroup for every finite group $F$.) It is finitely presented (K. Brown 1987, reference at the above link). It is not residually finite because it has the finitary symmetric group $S_\infty$ as a subgroup. It is amenable hence sofic.
Edit (Jan. 12 '20): the claim that finitely generated (locally finite)-by-$\mathbf{Z}^d$ groups are Hopfian is false, even for $d=1$ (one can construct a counterexample as central extension of a lamplighter group). Therefore I retract my claim that all finitely generated subgroups of $H_3$ are Hopfian; I don't know if it's true. Yet $H_3$ is Hopfian as well as its finite index subgroups, using that the locally finite kernel is virtually simple).
(As long as this is not fixed the answer should probably be unaccepted.)