Karlach starts out with nothing to lose and everything to gain by getting back at the ones who wronged her. That attitude makes it easy to talk about her death and terminal condition because she has nothing. At the end when you kill gortash she's got friends and she's been reminded about the world she loved in baldurs gate. Her perception changed there when she had more to live for than she had to gain. On the dock at the end she's got people willing to risk everything to save her and that is what gives her the strength to go back to avernus.

That's my 2 cents but yea it's really depressing thinking about that dock scene as her proper ending. What I do want to talk about is the likely hood of a dlc going to avernus and the forge.