It appears that the fate of each of these companions is tied to the fate of his faction... Is this accurate, especially in the case of Danse and Preston?
Deacon - You must side with the Railroad to keep him as a companion. (Don't want to add spoilers, so leaving the statement at that.)
Danse - You must side with the BOS to keep him as a companion. (There's more to this, but again, I don't want to put spoilers here.) Can you do his Blind Betrayal Quest without siding with the BOS?
Preston Garvey - Do you need to side with the Minutemen to get him as a companion? In a game where I did, I was able to get him after the ending sequence. I'm now playing a game where I sided with the Institute, and he just gives me Minutemen quests. Not sure if this is a bug.
X6-88 - I'm assuming his fate is tied to the Institute's.