For perishable items like bread, panic buying will stop when people realize they have more than they are likely to use before it goes bad.
For non-perishables like ammo, panic buying will stop once people realize they have a lifetime's supply. I'm not currently buying, since I stocked up a while back.
They will learn to keep bread in the freezer and resupply what they use before they run out.
They wont wait to run out of bread then try buying bread after they run out.
Too many people believe they need more practice shooting than they actually need and they burn through a hell of a lot more ammo than they need to for their particular situation which is personal protection.
The ammo supply will come back when people stop burning through their ammo supply.