If we’re to have Ben Solo die, I think the best way to go about it would be to have him heal Rey and die while Palpatine is busy turning the fleet into a BBQ. We have the force ghosts appear like normal but when Rey is about to ignite the second lightsaber, Ben Solo’s force ghost appears with his hand reached out just like the rest, ending Sidious with a final blow.
Later he would appear with Luke, Leia ( and maybe Han’s) ghosts on Tatooine.
A more meaningful death and redemption!