You have a problem that is common to scopes that have a zoom magnification ring to adjust the scope?s power.
Usually this is associated with cheaper scopes, though expensive ones can suffer if ill-treated.
You have to think of a scope as a tube within a tube. The outer body supports the lenses and the thinner or erector tube which moves to change elevation/windage, magnification and power, sits in the centre supported by springs and bushes.
Obviously every part of the scope needs to work smoothly and in unison and, of vital importance, it should consistently return to the same starting point throughout its adjustment.
However, cheaper scopes tend to skimp on quality materials and often parts do not work well together.
Typically, the elevation/windage adjustment can vary, or the rifle can lose zero from one day to the next if the temperature changes.
Quite often, and this is what you are experiencing, the zoom ring construction, often on the same inner tube, will move the whole erector tube as you change the magnification.
This will then obviously affect the windage or elevation and shift your zero.
The only answer is to replace the scope with another one to check that this is the problem and, if so, either to replace or repair the faulty scope.