The thing is. I bought the Xbox Game Pass and saw that games that are included in the pass have a purchase option. Does that mean that at some point the games will no longer be free and if so how long are they in there?
Yes, but you can still buy them to play them regardless of the Game Pass.
As long as you have the Game Pass, you can also play the games. You "borrowed" it, so to speak, and pay for it.
Is like with Netflix etc. The film and series there are only made available. If you cancel the subscription, you will no longer be able to watch films.
Means if you no longer have the game pass then you can just buy it
You can buy it at any time, even while you have the Game Pass, because there are also several games in it.
All games that are from Microsoft do not disappear from the Game Pass. But that's the case with other games. It is usually announced that the game will be unavailable in a few weeks. Usually a game is in there for at least half a year.
And of course there's the purchase option, some may have the game forever at some point and you will get a discount with the pass.