I think it was a good learning opportunity for the players that you need to be tactical and work together in PF2e, since they basically just all tried to attack the rat in melee. It also shows the value of having support characters in the party.
This feels like the crux of it to me. A string of melee attacks is frequently not the optimal path. If you feel like everyone learned good lessons, moving on with replacement characters seems totally reasonable. But another approach if folks are still feeling confused about the encounter might be to rerun it outside the campaign canon just as a wargame. I wouldn't do this frequently, but when learning a system that demands tactical acumen, it can be helpful:
- Reveal the full stat block of the monster so people can all discuss its strengths and weaknesses (OOC, as players trying to "win the game" rather than as characters in-world... this is not usually the way to maximally enjoy a TTRPG, but it can be a useful learning technique when engaging with an rpg that has significant tactical/wargaming elements you're struggling with).
- Look at the success/failure thresholds for various melee and spell attacks to see what is likely to work well.
- Look at saves and resistances. Were there unexploited weaknesses the party could have employed?
- Think about action economy and action denial. Were there actions and abilities the characters could have used to deny actions to the boss that are more important than the actions spent on the denial.
- I know this isn't a party with a lot of traditional support characters, but did they sleep on abilities that provide buffs or debuffs? Everyone has access to flatfooted via flanking and most classes have access to some kind of buff/debuff abilities.
- Talk about recall knowledge, how it's the in-game mechanism that turns actions into tactical knowledge of strengths and weaknesses. Tell them how you plan to run recall knowledge as a GM, what they can expect to gain from it and what the risks of failure are. It's an essential tool in the game, but one of the rare areas that's underspecified in the ruleset and leaves room to be interpreted in much more useful or much less useful ways. If this is a crew that struggles with hidden info and is just not knowing how to get started analyzing an encounter with a monster they don't know much about, consider temporary house rules around recall knowledge that are "broken" balance-wise to help them get their feet under them faster. Offer a free successful recall knowledge at the start of a spooky combat. Or offer to roll recall knowledge in the open and to give no info rather than incorrect info on critical failure (not raw, if I recall correctly). Do these things for 3 or so sessions and then re-evaluate whether they're still necessary. A very strong recall knowledge could certainly be abused by players with strong tactical analysis skills, but it may be just what weaker players need to strengthen up to do the basic tactics assumed in pf2e balance.
- Try the encounter with a couple different party comps. Can the original comp do better when played optimally? Or is the thing that pushes you toward success fixing the party comps to open up more options. Avoid over-optimizing party comp on one monster though. You want to be able to target a variety of weaknesses whether that is low ac, some particular bad save, denying big impactful actions, or buff stacking.
- Take note of key improbable dice rolls as well. If some big ability or spell gets wasted against the odds, that's bad luck and it happens. It might still represent optimal play even if it doesn't work out.
- You can do some of this wargaming alone as well if you want, and can relay your lessons learned to the party. But a wargaming one-shot with everyone might let everyone explore a bunch of ideas quickly and share their lessons learned.
- When you stop learning from a combat, feel free to stop it early and try a different config rather than rolling it out to the bitter end for no reason.
However you proceed, happy gaming.