If your tranny works for a little while after re-setting the codes, that tells me that you likely have a sensor problem. Hopefully, you have not done too much damage ignoring the CEL & can get by with the simple & cheap fix.
Phil (Unisys12) will likely be along to offer you more compresensive advice soon.