The wavelength of a particle once overcoming a potential barrier

I'm slightly confused about the idea of potential barriers and how they affect quantum particles. I understand that when finding the wave function for this particle, the amplitude of the function on the right of the barrier (assuming the particle is moving from the left to the right) is less than on the left simply because there is a lower probability of it transmitting through.

But what I don't understand is why are the wavelengths of the particle on the left and on the right of the barrier the same? Surely on the right it should be longer, since the particle must have lost some energy in order to overcome the potential - and since energy is inversely proportional to the wavelength it means it must have increased?

The square modulus of the wavefunction $|\psi(x)|^2$ of the particle gives the probability of the particle being at a certain location $x$. This probability, as you say, is lower on the other side of the barrier. However, when you find the energy of the particle, you are solving the Schrodinger equation, and the solution for the energy must be constant - in fact energy must be conserved, so it must be the same before and after the barrier.