Your design is good, and proper, and DOES meet a code for design, and its the company that is not compliant with a (660) code? this has to be the question, its nonsense to be asking if you are liable for designing in violation of a code. The question, though, can be read two ways.
In USA, my answer, as a risk manager/insurance and safety expert, is that the engineer would be measured against his duty to design. The design, will work well, and to code, if done (manufacturered and installed) by anyone, even a non compliant company, right? A group of monkeys could make and install a building, that if done to your plan, it would work for the design limits the code or the design calls for.. correct? If you don't have a responsiblity to check the install, check the manufacturers, check the quality of the materials but only the stamping of the design, then you would be liable for ONLY the design flaws. And, technically you'd have to show some nexxus for the failure, proximately, to the design flaw. For instance if it was found that you misdesigned a flashing waterproofing detail, and the building was snow loaded and the roof caved in, the nexxus to your flaw is not made to the collapse. IF water infiltration at the window caused a short, and a fire, yes, you are on the hook.
The duty to properly take the design and have it used and made in a factory that meets certain codes, that practices certain quality assurances, and have it put up/erected and finished by trades and contractors that meet other safety and quality and operational, licensing and training certifications and other levels of standards of care, is not resting with the engineer that stamped it, but with some other entity that uses the design, or trades and sells with the design. His fraud, or violations, and quality and certifcation issues, would be a question and certainly discredit him in some respects but he still has the defense for the collapse of him doing it exactly as designed, and just as well as the standard in the industry calls for. Then he might not be liable for the collapse, just for some arguable civil or staturatory or regulatory violations. Its like driving a car without a license, and/or doing CPR on a person that is dead/dying but your CPR card is technically expired... and doing either of those things just fine.... certainly no one cares if you save the life, or if you never have a crash. similarly, if you don't cause a wreck, and are wrecked into, you still get your car paid for by the other guy, since he's the one at fault.
Unless your country/province has a 'strict liability' rule that states that ANYTHING THAT HAPPENS to a building built by a non-compliant contractor, or sold by a non compliant manufacturer, is the sellers/contractors' fault, (and that would be crazy), then the actual cause of the collapse will be the key issue.
Unless the Engineer has reason to be in the chain of auditors, or supervisors or quality control checking persons, well beyond the design stage, then the lack of certifications, and quality and licensing, or whether they pay proper wages, or any other aspect of the downstream work regarding a building would not come back to him.
We had a lot of snow several years ago, and a 'cookie cutter' design for ccorner drug stores was used, and the alignment of the front of the store where a large e story facade mansard was located for looks, facing southwest caused severe drifting, from a Northwest/North east storm. The one's on different corners around the same area, facing different directions did not collapse. the losses were approtioned, since there were legitimatte arguments about who used the same design for a different exposure, whiel at the same time, some fabrication and some construction flaws may have also contributoed to t the severity of the fauilure... (i.e. I designed it wrong for this exposure, but it wouldn't have completely failed if the web stiffeners on the central beam had been put in, or the end welds on the joists hadn't failed like a zipper,,,, etc. ) But likely non of it would have mattered if the snow was snow overwhelming as to be beyond code. In this case the drifts and weight of snow was within the desing code.