This question comes out of the conversation in the comments of this answer. The answerer asserts the following: $\DeclareMathOperator{\rank}{rank}$
Suppose that $A$ and $B$ have the same minimal polynomial and that for all $\lambda \in \Bbb C$, $\rank(A - \lambda I) = \rank(B - \lambda I)$. Then $A$ and $B$ are similar.
My question: is this true or false? I think it's false, and will attempt to build a counterexample as an answer. However, I welcome any attempts in either direction.