To recover the original capacity, you must reformat and repartition the USB stick.
There is no need to reformat the disk to shrink the partition.