I do not think this will be a problem for your H1 visa application. USCIS usually need several weeks to process your H1 status cancellation after your employer notice them. During this time, you may leave US already. Also, you are still lawfully present as long as your I-94 does not expire even if your H1 status is cancelled.