But… if there’s a consistent system along which magic works which can be studied/researched/formulated, then isn’t it just… science?
The keyword is consistent. Some settings have magic as inherently chaotic and difficult to control.
A good rule of thumb is that if a fantasy setting has a school for magic, it’s probably a science. If it’s knowledge passed from master to magically gifted student, it’s probably not very consistent.