Disable USB class in a composite device
You could pretend that you have a removable disk, and that the user ejected it.

Alternatively, remove all MSC descriptors, and force re-enumeration (disconnect the D+ pullup resistor to simulate unplugging the entire USB device).