If I understand you correctly, you expect that the user should not be able to close a ticket that still has remaining uncompleted task(s).
That makes sense to me.
But you have found an issue with osTicket itself — it is not an osTicket Awesome issue. Please consider reporting this issue in the osTicket Forum or, better yet, open an issue on GitHub.