The valve manufacturer is the best one to ask.
In general, I can think of two concerns during welding and PWHT: (1) Weld splatter could cause damage. This is to be avoided by putting the valve in the position where the least damage can occur e.g. if it is a ball valve, keep it in the open position, and mask off the exposed portion of the seating area. (2) Heat could damage the soft seals and inserts, if any. Normally the manufacturer will provide a sufficient length for the BW ends to avoid this problem. Please see other threads in this forum for discussions on this topic.
However, I could not think of a possible relationship between the type of material (P5A, P5B) with the position of the valve. Can you clarify?