These OS don’t expect you to reset the device without unplugging. If this happens at the wrong time, you may end up with a corrupt system that does not mount anymore. I assume that you don’t need a factory reset, but you will have to repair the filesystem. Which might be too complicated…
For MicroPython, there is a nuke-uf2 somewhere here on the Pimoroni site. For CircuitPython I have seen instructions in the net about re-initializing the CIRCUITPY drive.