Discharging capacitor through potentiometer in ADSR circuit
Your MOSFET actually looks like this:







simulate this circuit &ndash; Schematic created using CircuitLab

Every MOSFET has an internal diode so called body diode. It is a result of how the MOSFET is constructed. (the 3 bars in the symbol represent the sandwich of 3 differently doped silicon layers. n-p-n. Of which 2 are connected. The unconnected p-n pair results in this diode)

Since you have \$7V\$ comming from OA1, there will be a current through D2, R2, M1 and finally R3. This current will charge C1.

If the rest of your circuit allows it you could reverse M1. Then the body diode will not allow current to flow that way. Only if you make the M1 low impedance (switching it on) will current be allowed to flow that way.