Mixed-Reference Spin-Flip Time-Dependent Density Functional Theory for Accurate X-ray Absorption Spectroscopy