What is a law in physics?
A law is a distillation of observations and measurements that when imposed on the mathematical models of physics, picks up those solutions that fit the data which imposed the law, so that there is a predictive physics theory.
In classical physics theories the laws of conservation of energy, together with the conservation ofmomentum and angular momentum have the strength of axioms, and have always been found true.
In quantum mechanics, there is a different connection between measurements in the lab and and the variables used in the theory, because the predictions are on the probability of observing a four vector $(p_x,p_y,p_z,E)$ for a given particle. The experiment you designed is theoretical , your particle cannot be observed. To be observed there should be an interaction , which cannot happen in an infinite potential well with one particle.
In the comments it is pointed out that if your problem is correctly mathematically formulated there is no violation of energy conservation, because the probable states occupied by the particle are not an observable. There is a probability that the particle is in one of the given energy states, but you have no method of measuring it. Wavefunctions are not observable, only $Ψ^*Ψ$ is observable , and it is a distribution of many measurements.
If it happens to be in that eigenvalue state, it will be stable there as the comments say.