I was creating a boot for macOS Mojave on my USB flash drive. The transfer of OS the transfer stopped suddenly, I waited for a few minutes and then ejected it.
After this when I reinserted I was unable to format it, it went to read-only mode. Currently, it's in ExFat Format.
I have tried formatting it in Disk Utility even in the terminal and it didn’t work.
I tried with this command:
diskutil eraseDisk JHFS+ Backup /dev/disk2
