Actually this failed. I tried to create a 10GB FAT partition called "testPartition". This is the output log:
Running operation 1 of 2: Add “testPartition” by splitting “Macintosh HD”…
Aligning shrink delta to 10,000,003,072 bytes and targeting a new physical store size of 489,963,171,840 bytes
Determined the minimum size for the targeted physical store of this APFS Container to be 216,160,387,072 bytes
Resizing APFS Container designated by APFS Container Reference disk1
The specific APFS Physical Store being resized is disk0s2
Verifying storage system
Using live mode.
Performing fsck_apfs -n -x -l /dev/disk0s2
Checking volume.
Checking the container superblock.
Checking the EFI jumpstart record.
Checking the space manager.
Checking the object map.
Checking the APFS volume superblock.
Checking the object map.
Checking the fsroot tree.
Checking the snapshot metadata tree.
Checking the extent ref tree.
Checking the snapshots.
Checking the APFS volume superblock.
Checking the object map.
Checking the fsroot tree.
Checking the snapshot metadata tree.
Checking the extent ref tree.
Checking the snapshots.
Checking the APFS volume superblock.
Checking the object map.
Checking the fsroot tree.
Checking the snapshot metadata tree.
Checking the extent ref tree.
Checking the snapshots.
Checking the APFS volume superblock.
Checking the object map.
Checking the fsroot tree.
Checking the snapshot metadata tree.
Checking the extent ref tree.
Checking the snapshots.
Verifying allocated space.
The volume /dev/disk0s2 appears to be OK.
Storage system check exit code is 0.
Shrinking APFS Physical Store disk0s2 from 499,963,174,912 to 489,963,171,840 bytes
Shrinking APFS data structures
Shrinking partition
Modifying partition map
Initialized /dev/rdisk0s3 as a 9 GB case-insensitive HFS Plus volume with a 8192k journal
Mounting disk
Creating a new empty APFS Container
Unmounting Volumes
Switching disk0s3 to APFS
Creating APFS Container
Created new APFS Container disk3
Preparing to add APFS Volume to APFS Container disk3
Creating APFS Volume
Created new APFS Volume disk3s1
Mounting APFS Volume
Setting volume permissions
An internal error has occurred and the disk for one of the specified operations could not be found. This may be a temporary issue, try again.
Operation failed…