Let's take a concrete example of the measurement process. Suppose I'm detecting the particle by firing high electrons at it. I can fire my electron beam towards the well and there will be some probability that my beam scatters off the particle. By measuring the trajectory of the scattered electron and tracing it back I can tell where the particle in the well was when the scattering event happened.
And what I'll find it that there is a small probability that the scattering event happened outside the well i.e. that the particle was outside the well when it collided with the electron.
But this doesn't mean that conservation of energy has been violated. During the scattering there will be some transfer of energy from the incoming electron to the particle. If the energy transfer is less than the well depth then the particle stays in the well, just in a higher energy bound state. If the energy transferred is greater than the well depth then the particle will be knocked completely out of the well and will head off towards infinity. In all cases when I add up the total energy before and after I find it's the same, and this is true whether the location of the scattering event was inside the well or outside it.