Let me share information about how Dividends works.
A dividend is an equity type of transaction and not considered as an expense. It is a distribution of a firm’s accumulated earnings. Thus, dividends are treated as a distribution of the equity of a business.
While Dividends Payable is a liability account that comes into existence when a company declares cash dividends for its stockholders. It is an amount of the after-tax profit a company has formally authorized to distribute to its shareholders but has not yet paid in cash.
To learn more about the retained earnings account, see below links: