Emily, I was motivated to answer your question because you seem to be having a common problem. It is difficult for me to trouble shoot your specific dilemma as I have not watched you or your corgi work. I have observed trainers who attempt to compete in agility and obedience concurrently do tend to have problems with attention and focus especially on the heel free. Before 140 of the agility pro's on this list nail me, let me add. I have not trained a dog in agility but I have observed the obedience performance of several dog/handler teams that do both. I am also quite sure that cross training these events may be NO problem for many trainers just as conformation-obedience in NO problem for many. In fact for the talented trainer cross training can be very beneficial.
I think that agility is very much like steeple chasing and show jumping in horses, while obedience is similar to dressage. Perhaps if you choose to concentrate on one or the other while you work through this problem you might have some success. Great heel free requires you do develop a sweet spot for the dog to "be in" no matter where you go. Agility requires the dog to work with you and read a corse at the same time. Try to see the cross over from the dogs point of view, perhaps you will see the answer to you training problem. I do believe that Teri the terrible is capable of earning a ud and I suspect that her problems are just manifestations of something you have trained her to do! Every training problem I have ever had, has been MY fault and I've worked through some LuLu's.
Any dog is capable of earning a UD and any Corgi is capable of doing obedience very, very well. I do NOT agree with people who are telling you to plug away at it. I think you should stop, step back from competition. Analyze your problem, try different methods to retrain. After things are looking better in training do some fun matches and work some reinforcement (either positive or negative) into the ring atmosphere. If you continue to complete at trials (no reinforcement in the ring) you will simple be setting an incorrect behavior pattern and be spending a lot of cash for entry fees and hotel rooms. It's your choice. I have heard the stories of ud's of battle scarred handlers marching along with the same ringwise dog for years. Would much rather be the handler who trains well and competes less, my last dog completed her obedience career in 10 shows cd-ud, with 2 all breed and 2 Specialty HIT along the way. Think your way out of this problem, it sure is cheaper!! Betty