Why do we say “Assalamu Alaikum” when saying goodbye?
Because in Islam the greeting of peace is for arriving and for leaving. Saying “Fi Amanillah” when parting is not forbidden, but the usual greeting is the same in both cases.
In some families people used to say “Assalamu Alaikum” on arriving and “Fi Amanillah” on leaving. Today one more and more often hears “Assalamu Alaikum” at parting as well. Some wonder why this has changed. In truth, today’s usage is the original one.
“Assalamu Alaikum” means “Peace be upon you”. It is a prayer for the other person, and the verse above calls it a blessed and pure greeting from Allah. Such a wish fits a welcome just as well as a farewell. Whoever arrives wishes peace. Whoever leaves leaves peace behind.
The hadith above says this explicitly. Whoever comes to a gathering should greet those present, and likewise when leaving. The first greeting is no more important than the last. So the greeting of peace is meant for both occasions.
“Fi Amanillah” means “in Allah’s protection”. That too is a beautiful wish, and it is not forbidden to say it when parting. It is simply not a replacement for the greeting of peace. You are welcome to say both. What matters is that the greeting of peace is not lost, neither on arriving nor on leaving.