Hi John,
Let us make trouble shooting below:
1. make sure the form you're viewing is same as the form that you've added javascript.
(Mine is Opportunity Main Form)

2. make sure you have enabled the Pass execution.. option

3, make sure for formContext.getAttribute("new_competitor") that its name field for your Competitor field on form.
If 1 and 2 and 3 are all ok, it would works as expect; If above steps still not work, please read following:
4. add a debugger at beginning part of setCompetitor(executionContext)

then 4.1 open browser developer tool (F12, I took chrome as example), and open your opportunity form with a closed opportunity,
you will enter debug mode, it will check whether there is anything wrong in code,
4.2 by click F10, you can execute function step by step,
4.3 if everything is ok, you could stay your cursor on results variable to see whether your latest competitor name has been included in _competitor_value@OData.Community.Display.V1.FormattedValue attribute.
4.4 and finally you'll go to formContext.getAttribute("new_competitor").setValue();
in other word, if there was no error in code, every variable will display their value druring the process.

(in my screenshot, I inserted a break point at function beginning for debug, which could be equivalent to add a debugger code)
If you met any error in debugging mode, please share me a sceenshot with error if possible, thanks.
Regards,
Clofly