Two different commands measuring two different things. Run this in the terminal:
open ~/Library/Containers/com.docker.docker/Data/vms/0/data/
In Finder right click on the disk image file (open the context menu) and click “Get info” a size in bytes and another in parenthesis which is the size on the disk. “du” is “disk usage”. It measures the used disk space and the disk image file is dinamically growing. The other size is the one until the file can grow and what the virtual machine inside “thinks” it can use. The size in the parenthesis can be different from the one you see in the output of du, because du uses units based on powers of 1024 unless you add --si (powers of 1000) to the options while Finder shows this automaically.