The infrared-radio correlation of star-forming galaxies is stronglyM⋆-dependent but nearly redshift-invariant sincez∼ 4