Yes of course. That is the only way for you to actually own the game after it leaves GP. Every week GP subscribers also tend to get discounts on some of the games that are available on GP.
To buy a game just go to the game's page on the store and one of the options will be to purchase it. Once you purchase it then you own it. There is no difference between the GP and retail version so you don't need to download it again or anything.