I use the military press as a general upper body push exercise, and when I’m working on progressing it, I think it’s fine to in essence turn it into a push press (also a solid upper body push exercise) and use a little hip drive, especially at the last reps of a set or with a challenging weight. You’re still getting a lot of benefit from that exercise, provided you can properly perform a push press.
But then I’ll keep that in mind as I’m tracking when/whether to go up in weight - if I need my legs to get the weight up, I won’t typically increase the weight next time, but instead work towards keeping that weight more strict.
But the military press is a hard lift to progress consistently, and I actually think it can be beneficial to once in a while do some push presses with heavier weights to build confidence under the bar and the feeling of getting and stabilizing that heavier weight overhead.