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.