In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
Answering your question, Dar Al-Ifta Al-Misriyyah, states:
It is also allowed for the audience listening to the sermon to laugh at the Imam’s humor and their prayer is valid as there is no prohibition against using humorous language to deliver an intended meaning.
Almighty Allah knows best.