I guess there’s the really unlikely possibility they already killed her character in this movie.
I’m guessing that Solo died because Harrison Ford had grown to hate the role and wanted him to die. I didn’t get the impression that Carrie wanted the same… rather, it seemed like she was happy to be reprising her character.
Ford wanted Solo dead for a long time, the freezing of Han in carbonite back in ESB was a middle ground that they came to in order to keep the option open to bring Solo back, which they did. Ford wanted Solo dead by the end of ESB.
I never got that impression from the original making of ESB book. Ford did not have a contract for a third film at the time. He wasn’t sure he wanted to come back at that point. It was even suggested that Yoda’s line “there is another” was partially a cover all bases strategy in the wake of the serious car crash Mark Hamill suffered between SW and ESB.
I never heard dead Solo talk from Harrison until Jedi.
As it is stated by Lucas in Empire of Dreams, after Star Wars Ford did not want to sign the contract for two more films like the rest of the cast. I think there is a common false idea among fans that Ford wanted Solo to be killed in the Jedi for the “sake of the story”. Ford simply did not want to be in Jedi at all and his idea was probably to kill Solo in way he would not be needed.
Now that I think about it, the whole carbon freezing scene might been just a convenient plot device for Lucas to be safe in case Ford refused to be in Jedi. That way he could easily either make Solo dead or “rescue him” in the last film.