After deleting Bootcamp .. I failed to merge free disk space using Disk Utility After deleting Bootcamp partition I cannot merge it back to Macintosh HD partition nor even using it to install windows again.

Using Disk Utility this is what happens:











I tried to login to MacOS recovery mode and do the same thing.. but still getting the same error..

Output from diskutil list:


Output from sudo gpt -r show /dev/disk0


*I'm Running MacOS 10.13.6 on Retina MacBook Pro Late 2013

Thanks
Thanks to David Anderson in the comment section.

I used that terminal command:

sudo diskutil apfs resizeContainer disk0s2 0


and it worked!

Thanks again!