Sunk cost fallacy, maybe? But not quite that. Knowing that something is going to go to shit, but holding on to it anyway in the misguided hope that things will work out.

If something is making you routinely miserable and anxious but features occasional highs and just enough reasons to keep going you need to hold on to those low feeling and have the self respect to call it a day.

Or. Make a little more effort and make things how you want them to be?