I can speak from experience, that insulation which forms a vapor barrier is not compliant with the residential building codes in Austin, TX and likely many other places due to the climate of the area.
Additionally, in the UK, many houses had this spray insulation inserted into their wall cavities, and the additional vapor barrier resulted in major damp and mold problems.