Problems formatting an SD card

Try

$ sudo wipefs --all /dev/sdb

/dev/sdb: 2 bytes were erased at offset 0x000001fe (dos): 55 aa
/dev/sdb: calling ioctl to re-read partition table: Success

and yet:

If you now try to create a new partition table using fdisk or gdisk. If that does not work the internal controller on the sdcard has likely detected a fault and has locked the card into read only mode.