Salamullahialyhi is used to both who are alive and those who are not and it indicates that the person is purified (infallible) whereas Rahmatullahi Alayhi is used only for the one who is no more in this world.
Sunnis use Radiyallahuanhu because it’s general and it doesn’t indicate to Ismat