Recently answered here: https://discussions.apple.com/thread/250711825?cid=em_apple_email_question_correctanswer_go_to_the_discussion_en-us&answerId=251355788022#251355788022
I was facing the same issue and was on the verge of reformatting my macbook.
Here's what fixed the issue for me. I'm not sure if step 1 was necessary, but since I did this en route to fixing the loop of death, I'll list it here for you to consider.
- Try to reinstall Mojave (this won't wipe your disk) - I wanted to return my macbook to as original a condition as possible, and I figured attempting to install Mojave was the best way to do it. Since I couldn't boot from "Macintosh HD" anymore (I was just getting a white circle with a bar across it), I rebooted my macbook and pressed Cmd + r. This helped me boot into recovery mode. Once there, I clicked on "Reinstall macOS". Don't worry, you won't loose your data doing this as it merely overwrites the OS, it doesn't overwrite your files. Once you do so, and assuming you're connected to Wifi, your macbook will start downloading Mojave and eventually attempt to install it. After an agonizing 30-40 minutes, it'll give you the same error - "not enough free space to install the OS".
- Try restoring from Time Machine Backups (you might actually have one) - I cannot emphasize how strongly I believed I didn't have one of these backups, but unbeknownst to me, it did exist on my drive. Even if you're convinced you don't have one, it doesn't hurt to give this a shot. Reboot and go into recovery mode again (press cmd + r during reboot). This time when the options pull up, choose "Restore from Time Machine Backup". Now, as I mentioned before, I thought I hadn't got this turned on, but I guess it was turned on by default by the OS. Your macbook will prompt you to pick a disk where the time machines are stored, and I picked "Macintosh HD". When I clicked this option, I saw about 5 backups populate from today itself. I picked one of them that felt fairly far away from the moment I had began installing this OS. For example, if I started my installation at 4pm, I decided to pick up the recovery from 2pm (even though there was a backup available from 4 pm).
Within 5 minutes, the backup restored. All my files were intact, even though I had explicitly moved out/deleted about 30G of files while trying to debug the installation issue.