@Qelix You are mistaking fire fighting foam with fire blocking foam. Fire blocking doesn't smother the fuel, it's merely a foam sealant, some of which having no fire retardant due to health concerns (I think that's mainly in california iirc), the main component responsible for the insulation is well, air.
https://www.youtube.com/watch?v=AeJ9q45PfD0
aerogel is so good because it's made out of mostly air. The material involved is mainly used for durability and structural integrity.
As for the dragonbreath, it has "intensity", but no "force" to speak of, in most fantasies (low to med., high fantasies have their own set of rules that normally don't even apply outside of their universe most of the time) that feature western dragon firebreaths, it doesn't "push" or send people flying (that's reserved for wing flaps, explosives like fireballs or galebreaths), rather turning them into charcoal or severely burning them where they stand. It's more like a enclosed BBQ unit fill with propane, more like a flash firing expanding outward as opposed to jet propelled flamethrower (think fire in front of an aerosol spray). The flash firing can singe you in a sec, longer duration cooks you (ala napalm style).
So foam wouldn't be blown away, as it isn't even a concern; that leaves the heat and duration. Source of foam is aquatic in nature, so the likeliest material would be a protein-mineral mixture (a natural occurring form would be sea foam). That leaves the only problem being how the protein denatures, an example would be grilled tofu skin (processed soy protein) being burnt over a grill , it'd still retain its shape and the inside is general still edible unless you leave it for a long time. Then you've meat protein (easier to transfer heat due to water, fats and other components) and egg protein where it coagulates, seeing as the foam retained its shape for the most part, it's more along the tofu/algea type of protein with a high air-mix ratio.
And in a manga with hardening, this part made a lot more sense cause the closest thing I can think of for on-demand hardening would be electro-contractions, and they are nowhere as hard as depicted in the manga.