The accelerator grid holes shift is a critical reason for erosion failure of optic systems in ion thrusters, which may also cause an unexpected roll torque about the ion beam axis. A three-dimensional model of ion optics is developed based on particle-in-cell Monte Carlo collision (PIC-MCC) method to investigate the plasma dynamics and performance of the radio frequency (RF) grid systems with misalignments of apertures, which are compared with those in the direct current (DC) grid system. For benchmark case, the three-dimensional model gives a better agreement with the experiments in the ion energy distribution function (IEDF) compared with the two-dimensional model from a previous publication, with 36.4% and 47.9% relative error reduction of the peak position and full width at half maximum (FWHM) respectively, indicating the effectiveness of the developed three-dimensional model. Simulations show that in the RF grid system the ion beamlet is deflected in the direction opposite to the shift of the accelerator grid hole, while electrons move first in the holes shift direction, and then deflect in the opposite direction. The average ion beamlet deflection angle calculated is consistent with the predictions by the linear optical theory in both the RF and DC grid system. The amplitude of beamlet deflection angle fluctuation with time decreases with the increase of RF frequency. When the grid holes shift, the ion beamlet will deflect with the divergence angle almost unchanged in the DC grid system, while the beamlet divergence angle increases in the RF grid system. When RF frequency is low, the big vortex-like structure in electron velocity phase diagram breaks into small vortices, showing a reduced oscillation intensity. The holes shift also causes high-frequency oscillation in the shift direction. In terms of performance, RF grid system is more sensitive to grid holes shift than DC grid system.