Resigning after H1B approval. Am I cap-exempt in the future and what will the duration of my H1B be in that case?

My H1B petition through my current employer has been approved but I will resign from my job before October 1st. The H1B validity dates are from 10/01/2018 to 07/25/2021.

If I want to find a new job in, say, 2020, does my receipt number and approval notice mean that I do not have to go through H1B lottery? Also, in that case, what will the expiration date of my H1B be? Will it still be 07/25/2021 so I have essentially wasted two years of H1B?