Encountered this issue on September 19th 2020. My MacBook air showed about 33GB of free storage, but would not let me download XCode; I probably tried 10 times and received the same error message of "not enough storage." I called Apple for help. We went through everything, the logging in and logging out of my Apple account, restarting the computer, logging into the computer in safe mode. Only after I freed up some more space and hit 40 GB of free space would the download start. Have no idea why this is, as XCode is only about 11GB.