I used to be plagued with boil-overs. I used my long handled spoon to stir the foam back into the wort and that seemed to work. Sometimes I couldn’t keep up with the foam and I’d have a boil-over anyway. Then I got the bright idea of simply skimming the foam from the kettle to solve my hot break dilemma. I subsequently noticed that my finished and conditioned beer wouldn’t raise a head when poured. After a few batches, it dawned on me that whatever was in that foam was the same material that I had relied upon to raise that whipped cream head on my beers that I had taken so much pride in before.
After lautering a wheat beer mash utilizing a 15 minute protein rest as part of the total mash regimen, I started heating the wort for the boil. Before the boil started, I got the characteristic foam in the kettle. I found tufts or little pillows of foam sticking through the normal foam. These tufts would not break apart and stir into the wort. I believe that they must have been composed of mainly high molecular weight proteins. A subsequent batch of the same recipe was mashed with a 25 minute protein rest and the little tufts did not develop. A rest of shorter duration might do the job but at least the rest timing is bracketed, for that particular grain bill.
These are a few thoughts from my experience - your mileage may vary.