No, there is no undo feature in the ATC feature of Microsoft Flight Simulator, however this use to be possible by reloading the flight plan (.pln) (or loading a different flight plan) and requesting clearance from ATC again.
The ability to load a new flight plan has been removed from the GUI (there is a work around that still works to load a .pln) but after having recently tested this in conjunction with ATC - the option to request a new clearance, once requested, no longer seems to be possible. I will test this again but I think it has been removed. I expect some reasoning behind this for further developing the feature, but the state has been incomplete for a long time.
So, in order to switch from VFR to IFR (or vice versa) and together with MSFS ATC, you will need to start a new flight, which means exiting your active flight to the menu and starting again.