In general - yes - you need to go back and re-entry the US legally. However, if you leave the US - you will be banned on the ground that you was illegally in the US for long time.
Because of such complicity - you would need a help from immigration attorney. You may apply for a waiver from re-entry the US based on some circumstances specific to you. Even if you will have to leave the US - it is strongly recommended to obtain the re-entry permit before leaving.
The answer is an advisory opinion (not legal or financial advice). After accepting the answer bookmark it - you may return to this page later for reference or to ask for clarification. Appreciate your positive feedback.