Here's an example of the sunk cost fallacy:
You decided to buy a solar panel because you heard that you can make money from them over time. Unfortunately, you didn't do enough research and bought an overpriced, cheaply-made solar panel. This panel cost you $5000 and is actively costing you $500 a month for repairs (it breaks very often). It only generates $50 of energy a month, so you're losing money by keeping it in operation, but you don't want to sell it or trash it because you've already spent so much on it and you don't want to end up with a net loss.
Here's an example of the "sunk gain"(?) fallacy:
You decided to buy a solar panel because you heard that you can make money from them over time. Luckily, you found a great deal on eBay and now own a high quality solar panel. This panel only cost you $200 and is very durable. It generates $300 of energy a month, so you quickly made a net profit. After telling your friends about your wonderful investment, one of them offered you $250 for it. You decided to sell it to them, even though you don't have an immediate need for the money, because $250 is more than what you paid for it originally.
In the first scenario, you continued to incur a regular loss because you kept thinking about the money that you had already lost, instead of thinking about the future.
In the second scenario, you gave up a great investment because you were thinking about the money that you had already gained, instead of thinking about the future.
Is there a common term for the second scenario? I looked up "sunk gain" but it doesn't seem to be a very common phrase.