Let $K$ be a field. For a $K$-algebra $A$ take the definition of the Jacobson radical of $A$ as the intersection of all maximal left ideals of $A$. If $A$ and $B$ are two finite dimensional $K$-algebras is it true that any homomorphism not necessarily surjective $f$ sends the Jacobson radical of $A$ to the Jacobson radical of $B$, that is, $f(\operatorname{rad} A)\subseteq \operatorname{rad} B$ ?
Both $A$ and $B$ are not commutative $K$-algebras.
In one hand, I was wondering if it is possible to understand this result as a particular case of the well known $C$-module version (as the radical of a $K$-algebra $C$ coincides with the radical of $C$ regarded as a right $C$-module):
Let $C$ be a $K$-algebra. If $M$ and $N$ are two right $C$-modules, then $f(\operatorname{rad} M)\subseteq \operatorname{rad} N$ for any right $C$-module homomorphism $f$.
Take $M=A\ $ and $N=B\ $ be two modules over the $K$-algebra $C=K$, then by using the preceding result we have $f(\operatorname{rad} A)\subseteq \operatorname{rad} B$.
The reason I am asking here is that, in the other hand we can find a counter example using 2x2 matrices here:
If $f$ is surjective, then the result is ok. What to do if $f$ is not surjective ?
So, any hint on what detail I am missing here would be greatly appreciated. Thanks !

Let me transform the comments into an answer.
The linked question already provides a counterexample, and the question is only about why this is not a contradiction to the (correct) statement about modules.
For a (left) $A$-module $M$, let us write $\mathrm{rad}_A(M)$ for the intersection of all maximal $A$-submodules of $M$. For $A$ itself, we usually "abbreviate" $\mathrm{rad}(A):=\mathrm{rad}_A(A)$. (Actually, this abbreviation is the source of confusion here.)
We have the following lemma (see SE/4464985):
What does it tell us about rings?
If $f:A \to B$ is a ring homomorphism, we can use $f$ to make $B$ an $A$-module $(a \odot b := f(a) \cdot b$), and then $f$ is also an $A$-module homomorphism. So the Lemma merely implies $$f(\mathrm{rad}_A(A)) \subseteq \mathrm{rad}_A(B).$$ The point is that that the right hand side is not $\mathrm{rad}_B(B)$, and also we will not have $\mathrm{rad}_A(B) \subseteq \mathrm{rad}_B(B)$.
The simplest example (commutative, albeit not finite-dimensional) is $A = K[X]_{(X)}$, $B = K(X)$, $f$ is the inclusion. Here, $\mathrm{rad}_A(A)= \langle X \rangle = X \cdot K[X]_{(X)}$, $\mathrm{rad}_B(B)=0$, but $X \in \mathrm{rad}_A(B)$ so $\mathrm{rad}_A(B) \neq 0$.