To .. Hiro
If the company handover documents about cancellation VISA Non-B which you have submitted by Email. From the date you have requested cancellation visa to Bureau of immigration. In that day before midnight. You have to leave out of Thailand immediately or, If you want to extend your staying in Thailand . It can stay only 7 days after that you have to fly out of country
Before you leave, the company will have to cancel the Work Permit VISA & Non-B which you had informed the HR department that only cancellation of the Work Permit because you will plan to go back to Japan and will return back to Thailand, which company already proceeded to cancel the Work Permit only on June 25, 2557
I would suggest that the best solution for you is to fly out of country and pay a fine at the Airport from June 25, 2557 until now and fly back to Thailand again as tourist. This may come in the category Tourism or etc. Then you can start to work with the new company without any problem. In order to the new company will have more time to prepare all support documents to submit for And the company will not have time to prepare documents to apply for VISA Non-B & Work Permit following.
I hope that this information will be beneficial to you because this best solution