I am sorry for the delay. It may be caused because your issues are not easy. We give general advice here and do not get into the merits of any legal case.
It seems as though you have received advice that you must leave the country and apply again. You have also been advised that you may appeal.
You MUST get your own lawyer on this matter. I cannot provide any better advice than what you already know. I have no magic wand. You will have to leave or appeal with a lawyer.
I can assist with the latter if you so desire but the true answer to your question is that you need to have personal counsel properly instructed by yourself. Online lawyers cannot assist.
Please let me know if you want me to further advise you.