Is PVC an acceptable pipe for a vent stack through the roof
National (international) plumbing codes identify vent pipe size, length above the roof, flashing and caps.  But does not specify material.  PVC, ABS and galvanized have all been used.
You are right PVC is not the best in sun, for my area in desert south west I do not know why builders use it but they do.  But same issue occurs on solar water heating systems and pool pumping/filter systems.  So I like to coat them with at least paint, but like to use white elastomeric roof coating if I have some handy.