I've been realising this recently, while I'm a professional programmer I only ever really learned the maths I needed for my degree and even then most of that got forgotten after I graduated beyond what's necessary for my day-to-day work. I did a bit of ML at university and I've been meaning to pick it up again but wanted to avoid half-arsing it by just learning the libraries rather than the underlying mathematical principles as well. One of the mental hurdles has been getting over this idea of "ML maths" as this black box, I've started with some linear algebra courses and while it's very interesting in its own right, it's also showed me I have some pretty enormous gaps in my knowledge!
Next time I'm between jobs (hopefully won't be for a long time) I'm going to revisit maths as its own thing, I really want to get my calculus and trigonometry up to scratch as well as things like linear algebra and statistics. It's interesting how quickly it leaves your head too, I did pretty well at university with ML but having not exercised those muscles so much fell out the instant that exam timer hit zero.