Numerical simulations have been carried out to study how
resonant magnetic perturbation (RMP) affects the loss of energetic passing ions. The loss fractions are compared between RMPs without and with the plasma response included, namely vacuum and response RMPs. The significant role of the RMP spectrum is revealed. More interestingly, inclusion of the plasma response, which to a large extent heals the magnetic topology, does not necessarily lead to a better confinement. In order to better interpret the result, it is crucial to clarify how the RMP spectrum affects drift islands. Due to magnetic drift, the structure of drift islands is essentially different from the magnetic topology. The primary contribution from resonant components and the sideband contribution from non-resonant components are compared in detail for the first time by tailoring the RMP spectrum. It is found that both contributions play an important role in the formation of drift islands under a realistic RMP. In particular, when an island chain is closer to the plasma boundary, the sideband contribution is more dominant, which is closely related to the radial profiles of non-resonant components. In the presence of a plasma response, sideband resonance becomes even more dominant and can still result in large drift islands, which may be a critical factor for the confinement of energetic passing ions in future discharges.