Not related specifically to settlements, but only tangentially. I had Preston as a companion while doing Minutemen radiants and other stuff, and eventually he gave me Taking Independence, so I agreed and he went off to the Castle. Went to pick up Ada and do A New Threat at the General Atomics factory, and after that I went with Ada and did Taking Independence, but after turning in the quest to Preston the game would crash within a few second of completion every time.
I was able to turn in the quest and immediately fast-travel away from the Castle, but going back to the Castle for Preston would result in a CTD. Noted some suspicious-looking stuff in the Papyrus log relating to companions so I tried dismissing Ada and re-recruiting her, thinking maybe Preston was halfway glitched in a companion state, but that didn't work either. Waiting several hours for Preston to return to Sanctuary didn't help, because he stayed at the Castle according to the Vault-Tec PMS's Overseer tracker.
Solution: prid 1a4d7 to select Preston and moveto player to extract him from the Castle and to my location. After that I was able to recruit him and return to the Castle to rebuild.