Many people don’t have a degree in STEM, let alone a PhD. Your academic credentials are not 100% perfect, but 97,5% perfect. You’re academic background won’t be a problem at all.
Machine learning is obviously important, but it’s not even 10% of job tasks a typical DS has to work at. What is more of a problem is a lack of industry experience in any relevant field (like finance, generic IT, etc).
Regarding gender, most probably it doesn’t matter much. I spent some time hiring and interviewing people, gender was never a factor. Though, your resume probably has a higher chances to be chosen for the first interview. But after that it’ll be your knowledge and your performance on the interview rather than your gender.
Leetcode might be useful for some programming heavy roles, but to be honest 95% of applications don’t require that much in terms of coding. So, I’d spend time grinding leetcode only if you plan to work with computer vision and/or in MLE roles. For “classical” DS it’s unnecessary.
Learning solid SQL, BI development, ETL skills might prove more useful. Many nominally data science positions are very light on coding and modeling, and very focused on data visualization, BI and data analytics.
Before getting to DS you need to understand that with 95% probability you won’t be creating ArRiFciAl iTelLiGenCe, you will be a glorified Business Intelligence Analyst with robust stats and coding skills. If it’s fine with you, learn Tableau, Power BI, ETL, Excel VBA skills, as I said above - they’ll land you on a job.
If “AI” development is what you’re looking for, those are MLEs that are doing it nowadays, and to become one you’ll probably need time as a SWE and/or DS/DA.
As for job security during recession - it’s kinda meh, if DS department is a breadwinner, they’ll probably be ok, but many data scientists are rather tertiary support positions just helping business, barely creating tangible value. Those people are fucked, haha.