I experienced basically the same thing on my 66cc Grubee with the Speed carb, the one with the shut off at the carb. It would start perfectly and would run nicely at very low speed. During excelleration, it would seem to be fine and then would loose power as if starving for gas. I pulled the carb twice and everything checkout out, no dirt in float bowl, needle and seat clean, main jet clear. The problem still exhisted. I then removed the fuel line from the tank pet cock and found that it was very hard to blow through even with the lower shut off on the carb fully open.Foam would indicate air in the lines...Where is the air coming from? Vibes should not put air in the line, unless the air was already there. Right? I am using the logic from days of working on oil burners... So if your gas is foaming at high revs I would think there is a problem with the fuel line, it is sucking air from somewhere at high revs (greater vacuum) the petcock itself might have issues, or where the line seats on your fittings, or even a pinhole in the line some where. The other side of the bad fuel line logic, is that you looked at everything else, and all that remains is the line itself...
Finally found the problem by removing the 2 screws on the carb shut off and pulling the assembly from the carb. The small black rubber gasket had a piece broken off and restricted the fuel flow to the carb. Put it all back together and no further problems. I think that overtightening these 2 screws might have damaged the gasket.