For People still searching.
I found the location of the files on mojave, I don't know about other versions.
The location is in the root folder/Macintosh HD the folder named macOS Install data(/macOS\ Install\ data).
The folder cannot be deleted but a line of code kinda worked for me.
I don't know if this code works or not as it gives operation not permitted as output, but after running the code I got the space back(The permission is probably only applied to the top folder or the os itself deletes the file after a while).
DO NOT RUN THE CODE IF YOU DON'T KNOW ANYTHING ABOUT TERMINAL, I DO NOT TAKE ANY RESPONSIBILITY TO WHAT MIGHT HAPPEN.
sudo rm -rf /macOS\ Install\ data