> I usually advise beginners NOT to start freelancing
I switched from product manager to developer through a masters, and started freelancing because while I received interest for FT positions from very good companies in my country, they only offered me junior positions (and naturally I cannot blame them), in a country with low wages. I ended up clearing over 2x the salary of a junior in my first year freelancing (so more or less the salary of a decent senior), working with two very large non-tech companies and one pre-seed startup.
However, I agree with your comment.
For starters, my situation is fairly exceptional; I have proven sales and product/project management skills. I'd feel comfortable walking into a room with C-level executives, pitching to them, and then delivering on those promises (while navigating fairly well the inevitable small failings such as missed deadlines, etc.)
But above all I wouldn't recommend this route to anyone who has even a remote possibility of getting an FT job because learning everything on your own is a gruesome process. It's possible, but it takes huge amounts of discipline and deliberate practice: you need to force yourself to read more code and books to discover patterns and acquire skills which would otherwise come naturally by just being present 9-to-5. Also bear in mind there's no outside pressure to write that unit test or refactor that smelly code - it's all on you. And of course you have no one to talk to - you have to endure a permanent and extreme loneliness in your doubts, only mitigated by making dev friends in real life and posting regularly on SO (and don't count too much on the latter!).
It's had positive things for me too. It allowed me to work all across the stack, from product management, design, front-end to back-end, and I am starting to position myself (locally, at least) as a product engineer that gets shit done, and to a high standard of quality. I also get to choose my own stack and technologies at all times (which also builds particular skills in research, etc.), and no corporate politics or whatever get in the way of you suddenly shifting your focus to a different discipline, which is what I hated most when I had a career.
Nevertheless, I'd say if I didn't factor the 2x wage (which is probably not realistic for a lot of starting devs), the cons would clearly outweigh the pros, and I would repeat your advice to most people.