You pay the fees before the interview. It is a fee for the process of having an interview, it is not a payment for getting the outcome you want.
I have no idea if they will allow you to keep the H1B valid to use in the meanwhile, it is possible under the current circumstances. But if your current job is more important than a green card and you don’t want to risk the $330 I guess you can withdraw.
I presume you were already before in the US with this job given the ban on issuing H1s? If so why curious why you did not AOS?