Who said anything about prohibiting the president from engaging in political events? Just not on our dime.
You didn't say anything about who bears the expense.
Is it OK so long as someone reimburses the government for its expenses?