As different futures contracts are priced differently, compensating adjustments will be made to the account to eliminate the impact on the price of the open position.
These adjustments are also known as “rollover adjustments”.
In essence, the difference in price between the current and next futures contract will be added or subtracted to nullify the impact on the open position's result.
Here is an example.