There are a number of factors to consider.
Firstly, when a dividend is declared and paid out, it is not necessarily paid out of the current year’s or period’s profits, but from the total of all historical profits, which will include those of the current trading year.
Keeping back or holding funds in order to settle corporation tax liabilities at some point in the future is always a wise move, however, this is more to do with what you have in the bank at any one time, and what you might reasonably expect to have in the bank at a future time when the tax is due to be paid. Timely forecasting and budgeting will help with that.
It should also perhaps be noted, that with most businesses, the amount of funds (ie cash in the bank) generated over a period of time does not typically or necessarily represent or equate to the value of distributable profits, and the two should not therefore be confused or treated as being equal.
As @dalacor has rightly pointed-out, your accountant can best advise you according to your circumstances.