This can depend a lot on genetics imo.
Like with afghan indica like genetics you have to veg them practically to size as the stretch can be as little as 0.5.
With viney kush stuff or sativas they can/will stretch for weeks and topping em at that time isnt the worst.
I dont know your grow sitch but i would top a few weeks before i flipped to get the shape i wanted and to allow more even apical distribution if that makes any sense.
It can also take them a week or so to respond to the change in red:far red and really start stretching.
Also topping stresses em as does flipping the lights and imo you need to give them time between these sorts of events.
Lastly if youre using more blue spectrum lights then that will hinder stretch because the far red:red phytochrome signal is weaker. I hope that kinda answered your question
What are you growing??