If your claim is the only reason you were allowed to stay/work, and you withdraw it, your legal status usually ends either immediately or shortly after the withdrawal is processed.
CBSA cannot guarantee they will expedite processing, but contacting them early and giving them your departure plan...