That myth is very common in gymnastics. However, there has been some recent studies that it was disingenuous as well.
However, I have heard from a couple of different ex-gymnasts that they grew after quitting gym. I chalk this up to the fact that they were not eating enough to grow bigger in the first place (some austere 3rd world country national training programs) and this was preferred by those in charge. With many other gymnasts, it is probably just an issue of not enough caloric and dietary intake.
It is very unlikely to ever be an issue with a rec gymnast. Probable onl going to happen with a competitive gymnast. One of my guys seemed to grow a bit after I became his coach which was something his parents liked since he was undersmall for his age. The issue seemed to be not eating enough to support his gymnastics AND soccer training. And I encouraged him to eat besides we looked into a lot of issues with his acid-reflux.