Merely failing one task won't get you fired and if you have the self-awareness demonstrated above to realize that you haven't yet learned what you need to become senior, gives you a clear path (and one that won't even be that hard if you've been selling and making software for 10 years).
Making software in a team is a somewhat different skill and you just need to learn it.
I contrast your case (understanding the issues) with a code review I did around 20 years ago where someone had hardcoded the value 17 in a bunch of places in a mixed c / c++ codebase. I suggested he use a #define for the magic/hardcoded values.
I kid you not, his resubmission contained:
#define SEVENTEEN 17
and the points of use all now said SEVENTEEN. (At least the instances of 34 were replaced with SEVENTEEN * 2.)That programmer wasn't going to make senior. You will. If you're getting code reviews that are pointing out these issues at your current place, stay there and learn. 6 months from now, you'll look back at your thread here and realize just how much you've progressed with the live mentoring in a team and the spaced-repetition of go away and code, get review, improve it, get review, etc.