$\textbf{Definition.}$ We say that the spectrum of $A\in M_n(\mathbb{C})$ is $2i\pi$ congruence free (denoted by $2i\pi$ CF) iff for every $u,v\in spectrum(A)$, $u-v\notin 2i\pi\mathbb{Z}^*$.
$\textbf{Theorem}.$ (for i), Hille https://link.springer.com/article/10.1007%2FBF01350286 ). Let $A,B\in M_n(\mathbb{C})$. If $spectrum(A)$ is $2i\pi$ CF and $e^A=e^B$, then
i) $AB=BA$ and, therefore,
ii) $A-B$ is similar to $diag(2i\pi\alpha_1,\cdots,2i\pi\alpha_n)$ where $\alpha_i\in\mathbb{Z}$.
$\textbf{Proof of ii)}$. From i), $e^{A-B}=I_n$ is diagonalizable and, therefore, $A-B$ is diagonalizable. Moreover $spectrum(A-B)\subset 2i\pi\mathbb{Z}$.
$\textbf{Remark}.$ i) Note that the matrices of Jyrki Lahtonen are not $2i\pi$ CF and don't pairwise commute.
ii) $A$ is $2i\pi$ CF iff $A$ is a polynomial in $e^A$ iff the function $X\mapsto e^X$ is one to one in a neighborhood of $A$.