Yes, if they will cancel not only visa bit also your contact. Then there is no problem to come back. But you have to make sure they cancel everything otherwise you will not be able to apply for a new visa. Sometimes the company cancel the visa but not a contract so this will be a problem in this case.