You are in NZ? Isn't everything upside-down there? ;D
When the PNP is supposed to be off, when the PWM's voltage exceeds the divider's 5V by 0.6V then it turns on.
When the PNP is supposed to be on, the LM339 feeds it a weak base current so it will be a resistance that might slow-down the rise...