Projectivity of the moduli space of KSBA stable pairs and applications