Generally viper is more beneficial in raids but there's some raids where you need a stun at certain points, so switching mid-fight isn't unheard of, it's just not part of a rotation.

One example is A7/M3 where you need to stun the big add, but staying in wasp after that isn't worthwhile.