So it could be the gas tank leaking air
No, the tank needs air to replace the fuel used otherwise a vacuum would form in the tank and fuel would cease to flow. The air could be in the fuel line between the tank and engine whereby the fuel pump would suck on the line but the air would reduce the suction on the tank thereby reducing the fuel volume.
Or you could have a bad fuel pump or cracked lines in the engine.
With the engine off, pump the bulb to see if it gets really firm and holds it. While in that condition, look around the engine at the fuel lines for signs of fuel leakage indicating a crack in a fuel line. If it won't stay firm and no leaks then carburetor needle valve isn't holding properly...carb kit.
On the fuel pump diaphragm or check valve, get back out and run at your high speed where the condition occurs and squeeze the bulb. If the engine recovers and you have checked the lines for cracks then go after a fuel pump rebuild.
Otherwise put in a couple of carb kits.