Conflicting impedancies in peak detector
You have a correctly connected positive peak detector that seems to be functioning correctly.

When you put in a sine wave with a period much less than the peak decay time constant of the output, the output will be above what the opamp is trying to drive it to most of the time.  During that time the opamp is trying to drive the output low, but it can't because of the diode.  It therefore saturates to the lowest output it can produce.  During this part of the cycle, the output will decay a little towards ground.

As a result of the output decay while the input is low, when the input reaches its peak the output will be a little less than what it should be, so the opamp output goes up and current flows thru the diode.  At this point the output tracks the input.  When the input goes down again the output stays up, the opamp output slams low, and the cycle repeats.

It would be instructive to look at Vs also.  At the resolution of the traces you show, it probably will look flat and just a little below the levels of the peaks of the yellow trace.  If you AC couple it and expand the voltage scale, you should see it go up sharply by a small step each cycle, then a linear ramp down between the steps.  Even at the lowest gain setting when you have the shortest output time constant, that time constant is 200 ms.  Your signal has period of less than 1 ms, so there will only be a small decay between the peaks of the input cycle.  This is exactly what we are seeing the opamp do.