Home insurance covers stupidity as well as acts of god, in most cases
They might send an inspector and then refuse to insure, but if you are paying the premium and make an out of code change that causes a claim, they are going to have to pay out for the most part unless your out of code changes are super negligent. Using screws instead of nails would definitely not be considered super negligent. Nor would anything ever be inspected close enough to notice that. Running electrical through the wrong type of PVC is also not likely to be considered negligent enough to deny a claim. Of course, doing everything right the first time is the better way to go anyway as you never know when an insurance may become super petty and try to deny a claim for whatever reason they can find.