Not every partitioning attempt may be successful. In my case, it showed that the partitioning failed and it had left the partition as an APFS volume. I then erased the volume in Disk Utility as MS-DOS (FAT) and it partitioned the volume successfully.