Docker Desktop for Windows v2, which uses WSL2, stores all image and container files in a separate virtual volume (vhdx). This virtual hard disk file can automatically grow when it needs more space (to a certain limit). Unfortunately, if you reclaim some space, i.e. by removing unused images, vhdx doesn't shrink automatically. Luckily, you can reduce its size manually by calling this command in PowerShell (as Administrator):
Optimize-VHD -Path c:\path\to\data.vhdx -Mode Full
The docker-desktop-data vhdx is normally in this location:
%LOCALAPPDATA%\Docker\wsl\data\ext4.vhdx
Thanks for this useful info!
Note that both Docker Desktop and WSL2 need to be stopped before running this, otherwise an error will occur:
To stop Docker Desktop, right click its tray icon and choose "Quit Docker Desktop".
To stop WSL2, open a command prompt and run
wsl --shutdown
.