runs with key in start position. but dies when its out

choke not opening all the way?

Or a bad coil
or a bad fuel pump
or an electrical connection that looses it's contact when it warms up

Please start by chking for spark after it quits and go from there.

Let us know