After a bit of digging, I found a potential culprit: some of the files were indexed for cache checking, but they aren't present. A debug.log file and the NPC Jsons folder.
The debug.log file should be deleted before builidng (I'll look into why it was indexed when it shouldn't be indexed). As for that folder, if it's necessary, it should be included in the packages (there's an option to add it in the Compiler and Packer tab in the Project settings). Otherwise, move it temporarily somewhere else.
EDIT: For some context: when strict cache checks are active (or turning off the setting to clear the cache after the game closes), the bootstrap checks the cache for anything weird. If it sees some files being edited or missing, the game closes. Once the game restarts, the bootstrap rebuilds the cache. It would explain the rare close since, at some point, the bootstrap notices activity in the cache and runs a check. And since those files were missing, it closed the game.