Installer says I need 22 GB available when my Macbook pro has 41 GB of available space

Unreal Engine 4.25 won’t install on my Macbook Pro, saying that I only have 17 GB available when I’ve spent hours freeing up 41 GB of space. The installation is only 22 GB, but it keeps cancelling itself. Where should I be installing it if not in my applications folder, and why does it not recognize all the space that I have?