I've noticed that bosses sometimes seem to visibly take damage after you've done enough to force them into the next stage of the fight but before the next stage actually begins. For example, when fighting Ribby and Croaks, their first form ends between attack patterns - they won't stop throwing punches or spitting fireflies prematurely in order to progress to the next stage. As a more pronounced example in World II:
Beppi the Clown only progresses to his second stage after he falls off the tracks trying to ram you with his car. At some point in-between that moment and his previous attempt at ramming you, his first stage health must have run out.
Once you've dealt enough damage to a boss to force it into the next stage but before it actually transitions, does the boss continue to take damage, shortening the time one spends in the next stage? Or does damage only start counting once the boss has transitioned?
(I've noticed that my special meter continues building either way, so it makes sense to continue shooting at bosses regardless. But I don't want to waste special shots on bosses if those will make no difference between stages.)