Of course, you are free to leave Canada at any time, but if you leave before your TRP application is finalized you risk being barred from reentering Canada. You will have to resolve the inadmissibility before returning to Canada.