If the judgment is set aside and a new trial granted as provided in AS 09.45.700, after the plaintiff has taken possession of the property, the plaintiff shall remain in possession. But if judgment is given for the defendant in the new trial, the defendant is entitled to restitution by execution as if the defendant were plaintiff.