There is an interesting derivation of $E=mc^2$ given here which I have updated to use relativistic momentum and relativistic kinetic energy. I find when doing the derivation that it doesn't appear that kinetic energy is conserved.
The setup: Consider an object $A$ moving at a speed $v$ to the right of an object $B$. Let $m_A$ be the mass of $A$, Let $KE_A$ be the kinetic energy of $A$, let $PE_A$ be the potential energy of $A$ and let $P_m$ be the momentum of $A$.
We consider the case of $A$ spontaneously emitting two photons (or generally equivalent pulses of light), one moving vertically up and one vertically down relative to $A$ in a frame where $A$ is at rest.
Frame where $A$ is at rest
$$\begin{matrix} \begin{matrix} \textbf{Before Emission} \\ \text{Potential Energy} = PE_A \\ \text{Horizontal Momentum} = 0 \\ \text{Kinetic Energy} = 0\\ \text{Mass} = m_a \\ \text{Photon Vertical Momentum} = 0 \\ \text{Photon Horizontal Momentum} = 0 \\ \text{Photon Energy} = 0 \end{matrix} & \begin{matrix} \textbf{After Emission} \\ \text{Potential Energy} = PE_A- E \\ \text{Horizontal Momentum} = 0 \\ \text{Kinetic Energy} = 0\\ \text{Mass} = m_a' \\ \text{Photon Vertical Momentum} = \frac{E}{2c} - \frac{E}{2c}=0 \\ \text{Photon Horizontal Momentum} = 0 \\ \text{Photon Energy} = E \end{matrix} \end{matrix} $$
From here we can verify that the total Potential + Kinetic Energy is the same before and after, and the momentum is the same before and after.
Frame where $A$ is moving at speed $v$ to the right
$$\begin{matrix} \begin{matrix} \textbf{Before Emission} \\ \text{Potential Energy} = PE_A \\ \text{Horizontal Momentum} = \frac{m_Av}{\sqrt{1 - \frac{v^2}{c^2}}} \\ \text{Kinetic Energy} = \frac{m_Ac^2}{\sqrt{1 - \frac{v^2}{c^2}}} - m_Ac^2 \\ \text{Mass} = m_a \\ \text{Photon Vertical Momentum} = 0 \\ \text{Photon Horizontal Momentum} = 0 \\ \text{Photon Energy} = 0 \end{matrix} & \begin{matrix} \textbf{After Emission} \\ \text{Potential Energy} = PE_A- E \\ \text{Horizontal Momentum} = \frac{m_A'v}{\sqrt{1 - \frac{v^2}{c^2}}} \\ \text{Kinetic Energy} = \frac{m_A'c^2}{\sqrt{1 - \frac{v^2}{c^2}}} - m_A'c^2\\ \text{Mass} = m_a' \\ \text{Photon Vertical Momentum} = \frac{E}{2c} \frac{\sqrt{c^2 - v^2}}{c} - \frac{E}{2c}\frac{\sqrt{c^2 - v^2}}{c} =0 \\ \text{Photon Horizontal Momentum} = \frac{E}{2c} \frac{v}{c} \\ \text{Photon Energy} = E \end{matrix} \end{matrix} $$
The trick then to derive $E=mc^2$ is to simply observe that in the left hand side before emission the total horizontal momentum (sum of horizontal momentum and photon horizontal momentum) was $ \frac{m_a v}{\sqrt{1 - \frac{v^2}{c^2}}} $ and on the right hand side it is $\frac{m_a' v}{\sqrt{1 - \frac{v^2}{c^2}}} + \frac{E}{c} \frac{v}{c} $ and by equating these we find that the change in mass $m_a - m_a'$ depends on the energy $E$ in the famous way.
But I realized with this model there is a problem:
The Question:
If you look at the frame where $A$ is moving at speed $v$. Then one sees that that the sum of Potential Energy + Kinetic Energy + Photon Energy is ONLY conserved if $m_a$ remains the same. Since we have on the left hand side:
$$ PE_A + \frac{m_Ac^2}{\sqrt{1 - \frac{v^2}{c^2}}} - m_Ac^2 $$
And on the right hand side:
$$ PE_A - E + \frac{m_A'c^2}{\sqrt{1 - \frac{v^2}{c^2}}} - m_A'c^2 + E $$
If we assume $m_a$ changes then some energy appears to have disappeared. How do I make this problem go away?