Footnote
If the borrower of the gold bar sold it in violation of the agreement between the parties, and the lender brought suit to rescind that transaction, the taxpayer could probably defer the capital gains taxation as a result of the sale while the litigation was pending, and could probably escape capital gains taxation entirely if a court rescinded the transaction in the course of that litigation. But if the gold bar was sold to a BFP (bona fide purchaser for value), the lender of the gold bar probably couldn't successfully rescind the transaction.
The money damages awardable in a breach of contract lawsuit by the lender against the borrower for causing the lender to prematurely pay income taxes on the accrued capital in the gold bar due to a sale in breach of the contract would not usually be damages (since they would ordinarily be due sooner or later anyway, unless the lender of the gold bar could convincingly argue that it would otherwise have been held without being sold until the lender's death at which point all unrealized capital gains would no longer be taxable due to the step up in basis at death).
But, an actuary or accountant could probably quantify the lost time value of money associated with having to pay those taxes sooner rather than later, although that would be a comparatively small amount.