I think this is just a scope problem
On the scope, click on the "Parameters" button. Go to the History tab and uncheck the "Limit data points to last".
With the 1Mhz PWM, the 1kHz sine wave, and the solver settings, the model takes steps of ~1e-8s. With those time steps, 5000 points is ~5e-5s, which is way smaller that a period of your sine wave.
Since you only see a small period of the sine wave, it looks like, as you say, "a straight line with some angle to the x axis"
Best Answer