Taxes on mutual fund distributions

Thanks for this reminder. I just checked the estimated distribution for 2 long held mutual funds in my taxable account.

Together, the estimated distribution will be $15k. My long term cap gains on the funds are only $20k. I’m thinking that i should sell prior to the distribution date. I will have to pay tax on the 20k but that is only on 5k more than i would have to pay anyway. If i want, I can re-purchase the funds after the distribution date to reset the cost basis.

Digging a little deeper i see that these mutual funds (Vanguard) are closed to new investors so if i want to reinvest i would need to keep a token amount when selling. If i understand this correctly, the distribution will be based only on the shares held on the distribution date.

Does the above sound like a reasonable plan. Any gotchas that i am missing?

Thanks.
trs