Topping is best done during veg, while the plant still has time to redirect the flow of nutrients to remaining branches before the stems harden. You can do it during the stretch phase of flowering, the first couple weeks, but it's better to let the plant recover from the stress during veg so the plant can focus exclusively on making the biggest, most resinous flowers ASAP.
Topping before you ScROG is a great idea. Topping afterward is a bit counter-productive. The reason for a screen is to support all the growing tips (which become bud sites) and keep them in balance.