The contract of this goalkeeper was about to expire in 2025 and since he wanted to be in the first squad there was the chance for him to leave but now since he extended his contract with Real Madrid, we are sure that Andriy Lunin is not going to leave anytime soon.
Even his competitor in Real Madrid, Kepa Arrizabalaga left the team.
You forgot to write that this was a rather unusual contract extension - now Lunin, along with Endrik, has the longest contract with Real - until 2030. Courtois has a contract until 2026. Apparently, in the long term, Real chooses Lunin. But in any case, given the density of the calendar, both goalkeepers will have game practice.
Due to the intense match schedule, especially the big teams are forced to use their reserve goalkeepers and players. Real Madrid has secured its goalkeeper by extending the contract of one of its trusted goalkeepers. If Andriy Lunin was not liked, his contract would not have been extended for this long. Real Madrid is not taking any risks regarding the contract.
If Andriy Lunin performs well in the matches he is on the field, his chances of being in the first 11 will increase. Real Madrid extended Lunin's contract and closed the goalkeeper transfer window for a long time.