lets say it's running out of fuel .. What could cause this if fuel flow to the carb is good and the carb is clean?
One thing is a sticking needle valve. It may not stick all the time. But when it sticks the float drops down but the needle doesn't open it's valve.
Try two things..
First, run the bike and cause the problem to happen.. when the engine dies immediately turn off the petcock and then remove the bowl.. see if fuel level is normal.
Second, make the engine die or wait till it dies and use a squirt of Starter Fluid in the carb intake. See if it immediately restarts without fail or still refuses to start.