If Leverkusen extends the contract of Xabi Alonso they will not let any other teams including Liverpool or Bayern Munich even think about their coach to hire Xabi Alonso for the next season. But the fact about Xabi Alonso and Leverkusen is they are going to play in the Champions League for the next season and if they have Xabi Alonso, they will be a strong team in this tournament. However, I think Leverkusen will also need to hire some players and get improve to make them ready to play against stronger teams like Real Madrid.
Sadly we don't have Leverkusen in the Champions League in this season, but I'm waiting for it until the next season.
Of course, because Xabi Alonso extends his contract with Bayer Leverkusen, Xabi won't move to any team. Liverpool and Bayern Munich must wait for the end of his contract, his contract will expire in June 2026. It means Xabi Alonso may move to a new team in the next 2 years if there is nothing change with him and Bayer Leverkusen. But if there is something change, Xabi can leave Bayer Leverkusen earlier.