When you remove the Windows partition via BootCamp Assistant, the free space of the deleted BootCamp partition should be restored to the macOS partition. Unexpectedly, some Mac users find the free space of the deleted BootCamp partition can't be allocated to the main macOS partition.
You should make sure you have used the right way to remove BootCamp partition from Mac, if it doesn't work, you can fix this issue in this way: back up your Mac, erase the Mac hard drive, and then restore the backup to the drive.