Hi and welcome to the forum! I had this trouble too at one time and I cured it by adding Sea Foam to the gasoline. I figure I had some dirt in the line that was causing the problem. Now I add Sea Foam only on occasion just to keep it clean. Works well in my truck too!
Mine now, but used to be my dads GX345 with a kawasaki did the same thing when he first got it. Then it started dieing after about 10 min. of mowing and a few later would fire up and mow for another 10-20 min. Took it to the dealer and they replaced the circuit board that has fuses on it located under battery by the dipstick and hasn't had any trouble for the last few years. Its an 02 and that happened in 05 or 06. IIRC the part was under $20 so it might be worth a try.