I would get a lawyer involved to try to get the situation clarified with USCIS. If you cannot get any confirmation from USCIS that your COS was withdrawn before it was approved, I would simply deal with it at the EB-1 green card stage, by submitting proof that a withdrawal was submitted before approval and that you in fact have a valid L-1 I-94. There may be other scenarios that your attorney (or Company A's attorney) might help you with. For best results, don't try to do this yourself.
This answer is provided for general education purposes only and is not intended to provide, nor does it provide, any legal advice. By viewing this answer you understand and expressly agree that there is no attorney-client relationship between you and the attorney who authored the answer. Should you need legal advice, please contact a licensed attorney who practices in this area. Readers of this answer and the information contained herein should not act upon any information contained in this answer without seeking legal counsel.
What can I say, Company B thought it did all it can to cancel the H1B change of status but USCIS turned a deaf ear. Now you are stuck. Calling USCIS' Customer Service would be the first step. American Immigration Lawyer's Association has an internal liaison channel with USCIS that is designed to defuse situation like this.
(646) 820-7658 Mr. Qiu is a co-chair of American Immigration Lawyer Association's New York chapter Federal Practice Committee. This response should not be deemed as the creation of attorney/client relationship. Legal advice should be sought with a competent immigration attorney.
Where is the company's attorney in all this ?
***973-735-2716*** Mr. Asatrian's practice is dedicated to the area of immigration and nationality law. ****email@example.com**** Please note the information provided herein does not constitute legal advice and should not be construed as such by anyone. It should not be relied upon as legal advice as more specific facts, research and analysis may be required to formulate a proper strategy and action in your matter. Please note this does not create an attorney-client relationship whatsoever. You should seek the assistance of an experienced immigration attorney to review your matter thoroughly and gather all of the necessary information and documentation to provide you with the best possible legal solution.