Whatever is going to burn gets consumed within a few inches of the case. Barrel length makes no difference for the burn time/amount.

The hot pressurized gases in the barrel are doing their work, pushing the bullet at an ever-increasing velocity. How the gases do the work is a function of the type of powder but his work comes to an abrupt halt when the bullet gets clear of the muzzle. The amount of work done by these gases is predicated by the length of the barrel. Whatever work they were still able to do when the bullet uncorks simply contributes to the muzzle blast.