Gauss' law states that the *net* flux across a closed surface equals the net charge enclosed divided by the electrical permittivity of the space. Moving the charge around within the enclosed volume does not change the net flux crossing the surface and Gauss' law still applies.  Moving the charge just changes the *distribution* of the flux across the different portions of the surface, not the net flux over the entire surface.

Hope this helps.