To use AC analysis (which you need to generate a Bode plot) on a switch-mode circuit you have to convert the PWM modulator (U3) to a linear gain block (assuming its transfer function is reasonably linear) with gain equal to the change in the PWM average output voltage divided by the change in error voltage at the modulator input.
Thus, for example, if a 2V change in the PWM input control voltage varied the PWM duty-cycle from 0% to 100%, and 12V was being switched, then the linear gain of the PWM modulator is 12V/2V = 6V/V.