When I as a DM have an opportunity to make a major change to a character, such as character death, conversion to a villain or non-villainous NPC, etc, I will bring up the issue with the player. It means you can't surprise them, but by asking their opinion and inviting their input on the idea, you can not only find out whether they will accept/enjoy the change, but also get additional ideas for ways to improve the change.
A few examples: A player was playing twins, one of whom was rather... homicidal. I realized that one of my NPCs would very much want that twin on his team. So I spoke to the player privately between sessions, to see how he would feel and how his character might react to a proposition from the NPC. He was thrilled by the idea, offering several suggestions for how his character could work as a villain from within the party for a time before converting completely. His character ended up becoming a miniboss for heroic tier.
Another player ended up being the Bearer of the Holy MacGuffin for the plot - the character responsible for carrying the items that the villains wanted. I warned him (both in and out of game) that this made him a target for the villains, and that they would focus their attention on killing him. His response was "bring it on!"
By talking to your player out of game about your plans, with as much or as little detail as you're comfortable with, you can gauge their reaction to your idea. If they're totally, completely opposed, you should probably change your plans, since your goal as a DM is to ensure the game is fun for all your players. However, my experience has been that, given enough information to feel that they're "in on it", players will generally treat such plans as a challenge to overcome or as a story component to expand upon and play with.
Players like to have choices, and like to feel that they can influence the plot and change their own destiny. Offer them this opportunity, and they will rarely be upset.
Have dinner with your friend and help her draw up a checklist.
This advise is taken from my own personal experience doing exactly this. And it did help the person I was helping significantly, though as part if it, we also created a character to suit their requirements.
Checklists are an amazing technology that are astonishingly underrated by many people. Functionally, the checklist's role is to enable pre-cognition outside the heat of the moment. With any sort of complexity problems, a checklist is a good way to reduce the granularity of the problem such that a player can concentrate on the novel elements.
So, while I made a checklist for my epic character, with a list of the actions I would take if this or that were true, or on the first turn, the point of the checklist is not to strictly adhere to the thing, but to reduce the need to think about all of the things on the list.
When having this conversation, first discuss common "patterns" in combat. Figure out common situations that she remembers from game. While there are plenty of theoretical situations, it's more important when doing this to let the cognition and inspiration of tactics come from the individual. Just like with making a cheat sheet, the act of making the thing is more important than the thing itself.
After listing all of the common situations that she can remember, work through sample outcomes with her in whatever way suits you two best. (My preference is for statistical analysis, but then I'm very special. One of the simpler ways is to play it through a few times, alternating sides and talking through your decision.)
After each finishes, let her work out a checklist of "if this situation is happening try for X,Y,Z" Then, after a set of checklists are done, let her employ them in game. After she does, make sure to debrief her after game (written or oral, since there is some literature that suggests a written debrief has great learning potential) and talk through what went right, what went wrong, and what needs to change in the lists.
Best Answer
The first question you have to ask is why is the player fleeing: does the player fear death, or the character? If they've made a character that is a coward, then you may have to find a way in story for them to overcome there fear: perhaps a dramatic moment where they are the only person able to save another's life, but they have to risk their own (or one of the things below may be enough to assuage them). If it is the player, they may need something more concrete mechanically to overcome this phobia. There are a few ways to handle this; you know your players and your party better than I do, so you can decide which seems like the best fit.
Talk to the Player
This one is probably the hardest to do because talking to human beings is difficult, but try to help them understand the balance of how they are only taking away from the fun of the game for everyone, including themselves: the party is at a disadvantage, fighting against a challenge meant for one more player than is present. The DM now has to worry about how to make sure these odds don't result in an unfun TPK (or something close to it) with the rogue running away. And the player is now hiding from combat, typically the part of TTRPGs that players get the most fun out of! If you can help them see how their choices are affecting the game (even if it's because of My Guy Syndrome) without blaming them or making them feel at fault, they may be more willing to make a change for the sake of the game night.
The way I've communicated issues with cowardly players (not characters) was explaining it to them in terms of hit points and actions: a party of 5 characters at level 3 should have 5 actions per round, and maybe around 100 HP. This means the party can theoretically have 5 actions and 5 hp left after a grueling battle, or they could have 4 actions and 75hp after the first round, because the tank is the only person taking hits and everyone else isn't taking "their share" of the damage. Yes, of course the tank's role is too take the brunt of the damage, but it is still important that the other members of the party have a chance to distract and take a few of the enemy actions to maximize the party's chances of surviving each encounter. Generally every class has some way to extend their own longevity; The wizard can cast shield, the rogue can force enemies to spend time searching for them when hiding with cunning action (and using their many other defensive features at higher levels), the druid can use wildshape to add to the HP pool, etc.; basically you need to make sure the rogue knows that sometimes they need to take a hit to keep the team alive.
Immersion Therapy: Knock them out.
Dying always sucks, no one likes being forced to make a new character. However, 5e is very gentle with death for players. If the player is knocked out in a way that seems unlikely to happen again ("I can't believe I rolled a 7 for damage on a crit! Exactly enough to knock you out!"), they can experience first hand how they have lots of ways to survive the damage:
Magic items to make staying alive easier.
While not anywhere in the original Dragon of Icespire Keep campaign, if you are willing to make some changes you could easily have a Periapt of Wound Closure replace one of the about 15 other magic items currently in the campaign; this item makes any unconscious character automatically stabilized. This should alleviate some fear of dying, as most attacks are unlikely to outright kill a player.
You could also give them access to more healing potions: Adabra Gwynn sells them at Umbrage Hill, and if the players seem unlikely to head to her, she may have someone bring potions to sell on her behalf to Phandalin.
Homebrew something else?
Maybe in their lineage they have some amount of orc, giving them the Half Orc's Relentless Endurance ability. Create a feat that allows them to flee as a reaction, when another creature finishes moving within 5 feet of them. Create a magic item that gives them access to cure wounds when only used on themselves. There are endless possibilities when homebrewing, however be careful not to focus too much on helping this character, as your other players may feel shorted.