Let $G$ be a finitely generated abelian group. So, we know that $G$ is isomorphic to $$\mathbb{Z}^d \oplus \mathbb{Z}_{q_1} \oplus \cdots \oplus \mathbb{Z}_{q_n}$$ for some $d \geq 0$ and powers of primes $q_i$. Let us write $G \cong B \oplus T$, with $B$ free abelian and $T$ the torsion subgroup.
Suppose $f : G \to G$ is a homomorphism such that $f(B) \subset B$ and $f(T) \subset T$. Additionally, suppose that $f \vert_B : B \to B$ is an isomorphism. Can we say that $f \vert_T : T \to T$ is an isomorphism?
No. For instance, for any homomorphism $g:T\to T$ at all, you could have $f(b,t)=(b,g(t))$ (thinking of $G$ as $B\times T$).