Not really. That makes no financial sense either.
Selling before a dividend payment date, unless you no longer wanted the shares or they hit such a sweet price, that you believe a crash to be imminent, is a strange practice.
A lot of people sell immediately upon reaching the ex-dividend date, it too has been shown to be a flawed system.
When you sell, the dividends payment does generally cause a relative share price reaction in a downward direction & you will absorb not only that dip but you will further lose on the spread between a current purchase price & its future sale price - that being anything from a fraction of a pence to several pence per share.
Likewise, to buy back in you instantly buy at a premium to the ‘sale price’. Not only that but stamp duty & other charges that you once had settled (on the previous holding), are applied again.
People need to beware all these strange practices. On occasion, the stars may align & you end up better off but that is few & far between.
The correct course of action is to buy steady dividend paying shares for the long term & retain them.
Dividend investing needn’t be complicated as many make it.
In fact, I believe Freetrade, T212 etc should apply a freeze on dividend share sales for 48hrs from an ex-date.
It must be a commission free phenomena because nobody in their right mind would do this hokey-cokey routine if they were subject to a commission charge on both sales & purchases.
Really bizarre tactics like these should be researched & understood.
There’s no way a financial industry as developed as the stock market, can be beaten by such a rudimentary tactics. They close any obvious gaps & rig fail-safes into just about any conceivable point of manipulation.