I have several DLE 20CC and bigger engines. Ensure your fuel tank is 3/4 and above when you take off. Pressure decreases as you ascend and it sounds like your plane is losing fuel pressure once airborne.
Also...make sure your ignition battery doesn't have an intermittent connection issue: once airborne. All you need is the battery wires to move ever so slightly and it will kill your ignition = killing your engine.
Remember gas planes vibrate a lot, and all it takes is one little solder crack you cant see and it will kill ypur engine while flying yet seem fine on the ground, leaving you scratching your head.
Hope this helps. Keep us posted!...interested to see what the problem turns out to be!
Sophia
RC Pilot and builder over 35 years.