You can see the sensor right at the top of the chute in this picture. I'm pretty sure that in addition to the sensor that counts the balls as they drop into the cute, there are light sensors that run along the ramp inside the goal to see if there is balls on the ramp. If there is, they allow the game computers to continue counting the score for the center goal for a five second grace period.
So if autonomous ends, and you have balls in the center goal but not yet down the chute, the balls will have five seconds to try to get into the chute and become scored. Also, I am not 100% sure about this, but if the sensors along the length of the ramp see any balls, they will not start the second period of the game until the five second grace period has passed (since the balls will still count for autonomous, and the alliances might not know who goes on defense/offense until all the balls are scored).