In a printed module, there was an encounter that the PCs were supposed to lose, either by running away or getting captured (them winning would undercut basically the whole second part of the module). Way too many enemies, and one or two above their level. The problem is, my party was a tad too optimized for the module. I had accounted for that, and added the final boss of the module to the encounter to be sure that they would still lose, but they still thought they'd play it out, resulting in a slugfest with more than a dozen NPCs with different statblocks getting their turn each round, and the PCs slowly realizing that they were getting railroaded and losing interest in the fight. Not the best session.