When a spell or ability grants control of a permanent "until end of turn," it creates a continuous effect with a duration (CR 611.2a). At the end of the turn, that effect expires and control reverts to the permanent's owner — this happens automatically during the cleanup step (CR 514.2).
The key point is that the control-change effect tracks the specific permanent on the battlefield, not what card types it currently has. If the permanent's type changes — say it stops being a creature due to an effect, or becomes an artifact creature — the duration of the control effect is unaffected. The effect simply ends when the turn ends (CR 611.2b).
There is one important caveat: if the permanent leaves the battlefield entirely during the turn and then returns, it is considered a new object with no memory of the previous effect (CR 400.7). In that case, the original control-change effect no longer applies to it, and it would return under its owner's control immediately upon re-entering — not because the effect ended, but because it no longer tracks that new object.
Example: You cast Act of Aggression targeting your opponent's Darksteel Juggernaut. Later that turn, an effect makes it lose all creature types and become a noncreature artifact. At end of turn, the control effect still expires normally and the Juggernaut returns to your opponent's control — its change in card type was irrelevant to the duration of the effect.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.