Each order item records how many units its checkout held. When the checkout ends or the order is paid, those units are given back, whether or not the product still tracks stock. Before, turning tracking off while a checkout was open could leave its units held for good, and turning it on could release units another checkout held.
A sale that finds less stock than it sold is recorded in full and leaves the product below zero, instead of stopping at zero.