Some stories end with the heroes losing. Simple as that. I usually make sure there are a couple of different paths available for the characters to take:
A rival Maga won't allow the Magi to pass through to the site of a Faerie Regio. I'd assumed up front that our heroes might:
a) Back down and go away with their tails between their legs
b) Back down... but find a sneeky way back in
c) Issue Certamen and lose and the follow a or b
d) Isse Certamen and win and get the prize that way
(They took option d, by the way)
In other cases, I simply don't know how the heroes are going to get out of a situation and I just let it play as it will:
A town, lost for a generation, is rediscovered. In that time it has become infested with Demons and Demonic spirits who have corrupted almost the entire town. While the Magi were inside a Divine Regio in the chapel on the hill (the last bastion of the Dominion) discovering the extent of the corruption, the Grogs in the town also realise the danger they were in.
They packed their bags and started to leave the town, taking the cart through the main street, cool as you like. Unfortunately, the Demons were by this time not shy about revealing themselves. At each step, more Imps and familiars nipped at the grogs and the cart hors.
The grogs knew they weren't getting out without a fight and drew their weapons. The inevitable happened. They were overcome by weight of numbers.
On that small level they had no chance. It would have been unrealistic to have given the chance to escape (although, to be fair, one of the grogs did botch so...)
The death of those two grogs was a major low point but I think entirely necessary to add depth to the saga.
For the wider story, the Magi found a way to drive the Demons from the town. It wasn't a resolution I'd planned (as I hadn't looked for any way out) but I was happy to oblige.
They'd lost someone important and frankly, drama dictates that the sacrifice wasn't for nothing.