Shabbat

This past Shabbat the 6th Aliyah was the beracha of veyiten lecha. People were interested in buying it. Can a person who is let’s say the only Kohen in shul wants it. Can he leave before they start to make it en Kan Kohein and then walk back in? Let’s say he is the only Levi In shul. Can he walk out so he can buy the 6th Aliyah. And if the Levi is allowed to walk out and what point does he go out? Right when the Kohen finishes his Aliyah? how could it work out? Would it be disrespectful to the other portion of the Torah if someone does this?