This is a system which is installed in single family houses and apartments depending on city codes. In the attic, an air sealed box is installed which is above the sprinkler head.
A sprinkler box is insulated from all three sides leaving bottom side exposed. The box must be fully air sealed on all seams and the box to the drywall lid. It hardly matters that which material is used like caulk, foam, or tape.
The concern is that it should never touch the CPVC pipe. It is found highly effective in life and property protection in case of fire. The air barrier material, which is rigid, durable and can be air sealed is worth using in the insulation.