I would start off by actually looking at the couplers. Notice how well the two couplers are actually connected. Sometimes, one coupler can be higher or lower than the one its connected to. If this happens, the cars will not stay connected. If this happens, I would try to bend one of the couplers so that they are more even. Otherwise, try buying new couplers or maintain a slower speed.