In my private projects I use cutting-edge frameworks, write tests (which actually test at that), solve algorithmic problems and learn new languages.
None of this takes place at work and still I get paid - mostly because what I'm doing for a living is akin to brick laying, since it was optimised for predictable outcomes(hilariously enough having tested code is not part of this optimisation - hiring a QA team once the budget for that is approved is, though).
The fact that you can't clearly delineate the point where you've learned to code doesn't mean that can't have learned how to code, and the fact that you can get better at coding doesn't mean you haven't learned to code yet.
The other point is, life is not finished with doing coding. While I'm still a not too bad programmer, in particular my C++ abilities are not on par with my former ones. Simply, because I nowadays write most things in Python, wear other hats than pure programming etc., but I certainly can say I learned to code.
When someone hires you? Maybe when someone pays you for an app you built?
For me it was the latter..
I get that the point of the post is to encourage others, but proclaiming to have "learned how to code" feels misleading because there is no real finish line for it. This is an open-ended skill, there is no such thing as being done with it, same with most other skills. Maybe you can claim that you self-learned how to do a Rubik's cube, but I have been learning how to code for 15 years and with each day I feel like there's so much more that I don't know.