The power of his parents' love could not be denied forever. On Kef Bir, Ben Solo turned back to the Light and made the decision to face the Emperor alongside Rey on her terms, rather than his. After a brutal fight that left him injured and Rey dead, he used all of his connection to the Force to restore the Jedi's paragon to life and was pulled away from his physical form.
But he was not gone forever.
A few weeks later, he was returned to the galaxy through a vergence in the Force on Yavin IV, sent back to warn the Jedi of the lingering threat posed by the Sith and aid in the fight against them.