It could be a few things.
Give us the engine model. Or mower model number
Should start with 917 I think.
It might be when it heats up your ignition coil is failing. Cutting spark to the engine
You are there stubing your big toe on the mower.
We are here trying to make head or tails out of what you have written
So some more details please.
What do you see, hear, feel smell from the instant you little pinkie touches the key till the moment the engine stops