OK, then I misjudged your situation a bit, and in this case, your problem is likely not the code side of things, but the communication side.
One thing is that you are obviously down on yourself. That is self-defeating and self-reinforcing, because if you are unconfident, people will also assume that there's a reason, and most likely the reason is that you are incompetent. It's not fair, but it's true, and it's very easy for people to sense if you're not confident. This is independent of whether you actually ARE competent or not.
Also, if someone says or implies that you aren't competent (as it sounds like your boss did), that does not mean they're right. YOU are in the best position to know your strengths and weaknesses, and rather than telling yourself "I'm not good at this, I should take a job in tech support", you should be asking yourself, "how do I get (even) better?". Which you have, in this post, and that's a great start. It helps to remember how far you've come since you started. If a boss repeatedly treats you as if you were incompetent, it's time to find a new one. A good boss will be helping you get better, always challenging you but not throwing you in over your head, and giving you a good deal of independence. I myself would prefer independence, challenge, and feeling valued at the expense of a less shiny title or even a pay cut, but that's a personal choice.
Secondly, people do not make hiring decisions solely or perhaps even primarily on technical skill. In my experience, they want a candidate who has a certain skill threshold, and above that, they weigh other factors. Those factors typically include: how well do they fit in with the team, how self-directed are they, how well can they communicate to find what the real problems are, and can they solve them. So, in an interview, unless the interviewer is an idiot, you will get more "points" for clearly showing that you know HOW to solve the problem rather than showing you can write a syntactically correct program on the spot on the whiteboard. Again, communication.
I would be remiss if I didn't add that it helps a lot as an applicant to know or be known by someone at the company. That is the real purpose of using GitHub as a resume: not so you can say, here, look at a sample of my code, but so that someone you're interviewing with might say: "OH, you're the author of the widely-used XYZ library? Well, we can just skip the formalities and start discussing salary." I can almost guarantee that if one of your repos has a few hundred stars, you will not get any negative comments about your coding style.
Finally, your referencing Python as a prototyping language and mention of JIRA make me strongly suspect that you're at a BigCorp. BigCorps are, in my opinion, not a good place to learn, grow, and get independence. You will be treated as a replaceable cog. I would apply at a place where I could find a niche, master it, and be valued, rather than be viewed as "bug fixer #1057".