For a general pbar from tqdm.auto, the easiest working solution I found is:
tqdm.auto
pbar.n = pbar.total pbar.close() break