Hi Kern,
I don't use any extension for security.
The log files (after a failed upload) report nothing, neither those of aaPanel nor the error.php of Joomla!.
With Joomla! 3 the problem did not occur, surely something changed in Joomla! 4 but surely something can be done at the server settings level because on client servers on different providers (not with aaPanel) the problem does not occur.
In php.ini, parameters like post_max_size, upload_max_filesize are fine.
I really don't know what it could be due to.
Any ideas?