If in a trespass to try title action the plaintiff obtains a judgment for the contested property, but the defendant obtains a judgment for the value of the defendant's improvements in excess of the defendant's liability for use, occupation, and damages, the court may not issue a writ of possession until the first anniversary of the judgment unless the plaintiff pays to the clerk of the court for the benefit of the defendant the amount of the judgment in favor of the defendant plus interest.
Tex. Prop. Code § 22.022