Stability of periodic solutions obtained via the averaging method for nonsmooth Lipschitz system