Regulation says that for you to be eligible for full 6 year limit, you need be 1 year physically outside of US, except maybe for brief business or tourism trips.
Check USCIS H1B Info . Search for "Six years" on the page, you will find it.
Technically, you are cap exempt at this point, so you would get remainder period. Regarding next year H1B 2020 season, I am not sure as you will be short by 3 months right, if you go in Dec 2018 ? You may talk to an attorney to clarify. My personal view is that, just to wait for 2 exta months and go back in Feb 2019( after 365 days), you will satisfy the 1 year outside rule and be eligible for next 6 years. You can double check with your attorney