Deductions & credits

IRS Pub 544 states that a capital gain or loss occurs when the transaction is completed. Since your transaction will not be completed until 2026 the earnest money which is part of that transaction should be part of the capital gain calculation.