I've heard people say this before, so a few years back I got all of my friends and family to send me a full copy of their insurance policies. 0% had any lines saying anything regarding work being performed by licensed tradespeople, or even that work must be done to building/etc codes. This was across multiple insurance companies in 3 provinces (Canada), for policies on condos, semi-detached, and detached homes.
I have my doubts that such a thing exists outside of extreme circumstances or internet commenters' imaginations.