Duty Cycle Demodulation Distortion Correction
To make PWM you probably should compare your (slow) incoming wave to a (much faster) triangle or sawtooth wave, not a sine wave. You need a waveform that has a a linear change in time_above_threshold with height_of_threshold. A sine wave makes the process nonlinear.

Your second graph shows this working well - just a small phase shift visible from the RC filter. You can ignore the first cycle or two, when the filters are getting over the startup transient of the simulation...

Note that all forms of distortion show up as higher harmonics. What you can't see in the FFT view is whether the waveform is becoming more square, or more sharp, or something else. (The detail is hidden in the phase of the higher harmonics, very hard to read by eye. An oscilloscope graph of V against time is much more useful in diagnosing problems with linearity.