Let $A,B$ be commutative rings with 1, $f:A\to B$ a morphism of rings, $M$ an $A$-module, and $M_B=B\otimes_AM$ the extension of scalars. Then is it the case that $\text{Ann}(M)^e=\text{Ann}(M_B)$?
The forward inclusion is simple, but I can't get the other direction and I also haven't come up with a counterexample. Thanks for any help.
Let $A=\mathbb Z$, $B=\mathbb Q$, and $M=\oplus_{n\ge1}\mathbb Z/2^n\mathbb Z$. Then $\operatorname{Ann}_A(M)=(0)$, while $\operatorname{Ann}_B(M_B)=B$ since $M\otimes_AB=0$.
Remark. In this example $A\to B$ is flat, but $M$ is not finitely generated.