I'm currently a sophomore in high school. I'm getting really bad grades and I'm missing classes due to me not being able to wake up early enough. I go to sleep at 2:00am and wake up at 6:00am. This impacts how hard I can actually work at school. I used to get anxious when attending school but now I only feel tired/shaky/sleepy and slur my words a bit, which is 1000% better than before in my opinion.

Despite all this, in middle school, I taught myself how to use technologies like html/css, JavaScript, jQuery, bootstrap, python and lua. I'm currently in a high school where I'm taught the basics of html/css+javascript and both of my instructors from 9th and 10th have tried to get me to instead get a mentor (the head of the computer science department at my school) to guide me and get me working with real life companies as a intern, which my instructor noted might get me paid but I'll definitely get experience.

On top of that, about 2 years ago, I also taught myself music production and I'm making side cash now by selling these beats and have tried helping local rappers/singers release songs on their soundclouds.

I can learn things pretty fast and efficient but feel like school is the only thing preventing me from actually building on my skills and the bad grades on my record will only decrease my chances of starting my career. As a matter in fact, because of school I used to consider doing drugs or just leaving everything(anxiety, alot of things to do, no time, no sleep) but have decided against all that.

And now the question(s):
Will bad grades dictate my life or can I wiggle my way into a well paid career in 15 years as a senior level full stack developer?
Do my skills mean anything significant and relevant at my age or did I now learn these technologies for fun?
Should I take my instructors advice to get a career-mentor?
Should I even be considering my career at my age and instead focus on improving my high school grades?

Sorry for the long question and maybe irrelevant details or confusing words. I will set this as a conversation since I've never used this site before.