Шулхан арух
Shulchan Aruch rules that in shacharit, one should not leave the synagogue before Uva letzion.