In one of my campaigns, it's possible that I'm going to have to pull off a Hopeless Boss Fight depending on the choices of my player (we're playing one-on-one). The gist is that they're interfering with the plans of a good-guy NPC who severely outclasses them, who needs to get an NPC away from them, and will respond to violent resistance with overwhelming but non-lethal force.
When players don't know that a fight is unwinnable, but it's a foregone conclusion because they're completely out of their league, how do I run the unwinnable fight in a way that's still fun for them? What are the anti-fun pitfalls or mistakes I should strive to avoid?
The opponent in question will not fight to kill (preferring knocking them unconscious over inflicting lasting injury) and will offer the player a chance to comply with their demands before the fight begins (allowing peaceful resolution of the encounter). My experience with my player has proven that my player doesn't mind things being railroaded for segments if they improve the story, so "cheating" my player out of winning is not considered an issue.
This question about preserving player agency when there's a predetermined outcome, but I'm looking how to make "a fight you can't win" as entertaining as possible. (After reading that question I have considered adding in different outcomes further down the line, depending on how well my player does.)