Marine carbonates, precipitating from seawater through inorganic geochemical and biogeochemical processes, are considered to have recorded the seawater geochemical signatures reflecting the marine environmental conditions during their formation. However, they are susceptible to post-depositional diagenetic alteration. The redox conditions and chemical composition of the diagenetic fluid may be different from those of the overlying seawater. Therefore, assessing whether carbonate rocks that have experienced variable diagenesis could still preserve primary seawater geochemistry is a prerequisite before inferring ancient marine environments using geochemical tracers such as the cerium anomaly (Ce/Ce*). Here, we investigate rare earth elements plus yttrium (REY) geochemical features of reefal carbonates from the XK-1 core in the Xisha Islands of the South China Sea. We aim to evaluate whether island carbonates have the potential to preserve reliable primary seawater REY geochemical characteristics after experiencing meteoric diagenesis, marine burial diagenesis, or dolomitization. The results show that even after variable diagenetic alteration, all carbonate samples exhibit seawater-like REY patterns, which are characterized by negative Ce anomalies (Ce/Ce* < 1), distinctively high Y/Ho ratios (>44), and uniform depletion of light rare earth elements (LREE) relative to heavy rare earth elements (HREE) ((Pr/Yb)N < 1). This suggests that the original seawater REY signatures are retained, regardless of varying degrees of changes in the mineralogical composition, diagenetic fluid composition, and redox state. The unmodifiable REY characteristics in carbonates during diagenesis can be attributed to three aspects: (1) during meteoric diagenesis, the low REY content of meteoric fluids and the short-term reactions between fluids and carbonates make it difficult to significantly alter the REY composition of carbonates; (2) during marine burial diagenesis, the ubiquitous cementation creates a relatively closed environment that facilitates the inheritance of REY signatures from primary carbonates; (3) during dolomitization, the dolomitizing fluids derived from penecontemporaneous seawater would not destroy but rather promote the preservation of the original seawater REY signatures in dolostones. The Ce/Ce* variations indicate that the Xisha carbonates have been deposited under constantly oxic conditions since the Neogene, consistent with paleontological and redox-sensitive element geochemical evidence.