I maintain that changing the allegiance of the capital should be obvious to anyone to not be intentional. Can anyone here imagine Paris becoming a part of Germany through peaceful means, or Washington D.C. voting to join Canada?
There is, however, one important thing to consider, back from a time when city == duchy - with the capital unable to switch, a ruler could prevent a duke from defecting by making his city the capital. That is probably where the confusion is from. For that reason I can imagine I once said that we should not game-mechanically prevent it.