The correct way to delete the BootCamp partition is by using BootCamp Assistant. After choosing Restore/Restore disc to a single macOS partition, you should have a single Mac disk.
If you find the free disk space of the deleted BootCamp partition can't be removed and allocated to your macOS partition after you remove Windows from Mac, you should then back up your macOS partition now, reformat the Mac hard drive, reinstall macos, and restore your files to it.