Can't save data asset created in C++ because it's "partially loaded"

Trying to read JSON files to automatically generate data assets with but when I try to save the package I get a crash with the message in the title. Sometimes it works but most of the time it won’t. Sometimes naming it differently will cause the crash but then when you name it the old name it won’t crash. Doesn’t make any sense to me.