Barcelona is a second home for Guardiola, besides being successful as a player, he is also successful as a coach and he has become one of Barcelona's living legends. He would not hurt all the fans and parties involved with Barcelona, it is very unlikely that he will be Ancelotti successor because of his very close relationship with the club. Xabi Alonso's experience is still very minimal, but his quality as a coach is unquestionable. Previously, Real Madrid also gave him a chance when they appointed him as the main coach, maybe if Alonso is given a chance, he can achieve success with Real Madrid.
Pep Guardiola's career developed rapidly when he was at Barcelona and he became one of the coaches to be reckoned with because he managed to give several of the best titles to Barcelona. If you look at his early history as a coach, then he should not have accepted the offer from Real Madrid because it could hurt the feelings of the fans and the Barcelona management. Based on these considerations, I think Pep Guardiola is very unlikely to become Real Madrid's coach even though many people want him.
For Xabi Alonso, it might be much more potential even though he has to work hard to become the coach of Real Madrid because becoming a coach with a team full of history will be much more difficult and the pressure will also be much greater when he fails to bring Real Madrid to be more successful than before.
Guardiola coaching Madrid seems to be very impossible to remember the rivalry that has occurred between Madrid and Barcelona so far is very large, so it will affect every player and legend not to try to cross to a rival team, I quite agree with you, I also think that Guardiola will not want to be a traitor for Barcelona by coaching Madrid later, because if that happens then it will only destroy the good name and also all His achievements with Barcelona so far.
If we talk about Ancelotti's successor in Madrid, indeed so far many coaches have been linked but it seems that Alonso is a strong candidate to continue Ancelotti performance later in Madrid, especially we know that so far Madrid has been Alonso top priority if he leaves Leverkusen later, although he is a young coach and his experience is still limited, however he has shown great tactical ability at Leverkusen, so I think if he is given the opportunity then maybe he can bring a lot of changes and a modern approach to madrid team later.