Upvote:5
There is nothing in either 8 USC Β§1187 or 8 CFR 217 that suggests your visa application will have invalidated your ESTA authorization. You can check your existing authorization to confirm this at https://esta.cbp.dhs.gov/esta/.
The ESTA page says you cannot apply for authorization if you hold a valid B visa, but they likely didn't consider the case of someone with an expiring visa, and it should be fine to apply for a new authorization before your current visa expires. (You cannot enter the US in the visa waiver program when you have a valid B visa, but because your planned trip is after the expiration of your visa, you aren't planning to do that.)