When the engine stops there is no vacuum, this is what causes the switch to engage the starter. Quite possibly a vacuum line is dried out and when you accelerate the vacuum is to low.