Of course, we all know that T’Challa is not permanently gone.
Even knowing this, T’Challa’s death was still shocking in the film because of the popularity of the character.
The character is now one of the MCU’s most popular and his sequel film is inevitable and thus T’Challa, like Peter Parker, will not stay dead long.
This ending has meaning because while we know that the king will return, we still feel sadness for the pain of those left behind who imagine him gone for good, like Nakia and Okoye, and possibly Shuri.