Is there a finitely presented sofic group which is not residually finite, but all of its finitely generated subgroups are Hopf groups?

It seems like the Baumslag Solitar groups $BS(m,n)$ don't work (i.e. for $|m|=1$ or $|n|=1$ or $|m|=|n|$ they are residually finite, and otherwise they contain a non-Hopf finitely generated subgroup).

**Note**: Thanks to YCor for pointing out that in the initial formulation I said "subgroups" instead of "finitely generated subgroups". The latter is my intention.