This is the Cell Reset Bug. This was especially problematic for FO4 because Power Armour frames are also technically containers and so if the cell reset bug was triggered it would also affect them causing your customized power armour to reset back to a bare frame with one or two rusted T-45 pieces on it. It was finally fixed a while ago. So Im looking through commands trying to find one to reset an interior cell. But not like just the loot, I mean like everything. For instance, Home Plate. I scrapped everything in Home Plate and made it bare, but then found a mod called Home Plate Renovation. I had already cleaned out Home Plate.
Contents Commandscoc - Use this console command to teleport to a specific cell.