I think someone mentioned to put it into highest gear before folding - the cable is slack then and can handle folding better.
+1. If that doesn't work, try the opposite: shift to the lowest gear for maximum tension on the cable, maybe that will hold it in position better. I had a similar problem on my Downtube Mini. I shortened all the cables, but that did not help. Then I bound all the cables together for a distance of about 25 cm right in front of the stem. Now when I fold the bike the cables don't seem to move at all, and that seems to have taken care of the problem.