All algorithms will suffer from precision loss anyway, so you will most likely never achieve exact periodicity. Nonetheless, you can also try to increase the precision of the integration by using the parameters "atol" and "rtol", which, roughly, will keep the error of the integration below (atol + rtol*y) at each time step. You can typically go as low as atol=rtol=1e-14.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…