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.
Me also getting same problem whenever I try to update Xcode. At least it should show update size of any app. It doesn't show update size for any app in App Store. How can we know which update is consuming how much data? If it explicitly asks that I want exactly this much of space for installing updates then we can do something about it. Without showing update size it simply goes on asking for more space for whatever free space we provide. Anyway this problem was encountered when I updated from
Catalina 11.15 to Big Sur 11.0 (trouble moving Xcode from 12.4 (12D4e)) to 12.5