The question what was bothering me for a long time. In Disney's "Aladdin" Genie told to Aladdin what price for his magic is being a slave of the lamp. OK, he got his freedom, his powers were seized, just as his "chains", and he pranked Al by NOT fulfilling his wish, because "he can't". And the very next moment he is flying by himself, creates the suitcase, and ready to travel. Not to mention, his usual behavior as lampslave in the next movies and serial episodes has not changed, though he was not a slave anymore. Why did he keep his magic?
In popular culture, freed genies always retain their powers. In myth, Jinn are magical creatures, and their enslavement only limits when and why they can use their powers.
In Disney, Genie isn't given much back story of how or why he became an enslaved genie or gained his powers. He's even forgotten his real name after 10000 years.
But the movie at no time said or implied he'd lose his powers if freed. That said he does end up with reduced powers:
After getting his freedom, it is unclear of these limitations still implied, although he stated that he had suffered a reduction in power due to his new freedom, describing his current powers as now being "semi-phenomenal, nearly cosmic power" as opposed to his previous "phenomenal cosmic power". Due to his weakened state as opposed to Jafar's full power, the now-genie Jafar defeated him during the "You're Only Second Rate", musical number as well as deflecting all of his magical attacks.
At least he ends up with a better living space.
The wikia lists other examples of his now lesser magic