I had the same issue with three robots I build only for settlement security for Longfellows Cabin. Each time after they were finished and I left and returned a few minutes later each reverted back to a basic protectron. I varied the builds thinking it was one of the robot elements causing the issue. I am using an Xbox series X so console commands and mods are not something I use. The reverted robot cannot be self destructed for some reason, so instead I used them as target practice. Any solutions yet?