Changing position moves energy between spring and motion while the total stays exact. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
At the endpoint the spring holds the full total
Position 4 m gives spring energy 16 J and kinetic energy 0 J. Their sum stays 16 J.
U+K=16J+0J=16J
Half displacement leaves most energy kinetic
Position 2 m gives spring energy 4 J and kinetic energy 12 J. Their sum stays 16 J.
U+K=4J+12J=16J
At the center all stored energy is kinetic
Position 0 m gives spring energy 0 J and kinetic energy 16 J. Their sum stays 16 J.