Take both lines off of the carb.
Put your finger over one of the carb ports.
Prime the carb.
Is your finger sucked in or pushed out ?
If it is sucked in, that's the hose to the filter in the tank.
If not, that's the return.
Also the vent cap could be bad.
If the tank gets pressure in it you will have the problem you described
You said it ran good without the cap on the tank.