It ultimately depends on what your institution's academic integrity policy states. A majority of universities categorize submitting work generated by artificial intelligence, as if it were your very own, as being in violation of this policy. Furthermore, using a humanizer to hide the fact that you created something using artificial intelligence will be treated as the same offence. However, using an AI tool for polishing up the writing you have already created (to make clarity concise) and fixing tone differences in your original writing, would normally fall into line with the same general purpose as a grammar checker, which most schools will allow.
The line in this context refers to 'intent': correcting your own writing is an acceptable way to use a tool; passing off as your own something that isn't (even if that item was somehow produced using a tool) is dishonesty regardless. If you're ever unsure, make sure to see what your school's specific policy is about AI before submitting anything. If you'd like more information regarding ethical use of AI tools I'd recommend looking further into it here, read Top 10 Prompts to Humanize AI Generated Text. Quetext's AI Humanizer is designed to refine your writing while keeping your original voice and meaning intact.