I thought the OP was concerned over bad timing, like this:
(1) you sell before the "record date" for one fund, and do not get a dividend
(2) you buy a new fund after its "record date", and do not get a dividend
(3) the new fund's price drops on the payable date as everyone else gets a dividend
You might look up the index fund (ETF? mutual fund?) and click "distribution" for details of past dividends. Most likely, the record date is week(s) from now, giving you time to move between funds. I can't be more specific without knowing the funds.
Probably just a typo above, but it relates to the OP's question so I'll point it out.
The price would drop on the day after the record date, not the payment date. If, for example, the record date is today, 12/4/2023, and the payment date will be 12/15/2023, you would still get the dividend on 12/15/2023 even if you sold on 12/5/2023. Likewise, the price of the fund would be expected to drop between 12/4/2023 and 12/5/2023 because people buying on the 5th don't get a December dividend anymore. That is, 12/5 is the "ex-dividend date".
In practice, dividends are usually small enough that the effect of dropping on the ex-div date is overwhelmed by whatever direction the market is going that day. So I personally would not worry too much about this. If you missed the December dividend you would also miss the drop on the ex-dividend date. Likewise if you received two dividends in December you would have experienced the drops of two ex-dividend dates. It's a wash.