HSPICE code to cut off supply voltage of a subcircuit
The issue here is that the transistors don't have zero on-resistance (it depends on whatever your model is) so you get the RC (the on-resistance of the transistor and the capacitive load of the subcircuit) discharge and non-zero final output.

If this is an actual design, you're going to have to deal with it.  If you have a power mosfet and the current of the subcircuit is not too high you can put a pass device you turn all at the same time you switch the supply.  (This is essentially using a voltage regulator with shutdown to drive your subcircuit).  You could also use a bigger (larger W/L) device.  Typically mosfets that need to deal with large currents are very large.  Your devices are quite small as it is.  Try something more like a mm or two for W.

If this, instead, is simply for a simulation testbench, you should use an ideal switch instead of a transistor.