I can't save changes and after that I get The connection has timed out

Your software
My Mautic version is:5.0.4
My PHP version is: PHP 8.1 (ea-php81)
My Database type and version is:MySQL , 8.0.36-cll-lve - MySQL Community Server - GPL

Your problem
My problem is: I have a fresh installation of Mautic and when I try to create and save email template I’m getting notification Your request could not be processed
and after that I can’t access Mautic, the entire server gets blocked.

These errors are showing in the log: Today’s Mautic error log is empty.

Steps I have tried to fix the problem: I have reinstalled the Mautic.