Setting PHP configuration with apache2handler no longer works

My server was upgrade to Debian 12 which included an newer version of PHP, i.e. 8.2. On this server I have a couple of VirtualHosts. Of which some of them have deviating php values defined. In the VirtualHosts I added these lines:

        php_value post_max_size 10M
        php_value upload_max_filesize 10M

The problem is that these values are now being ignored. This worked for PHP 5.x versions and PHP 7.x versions. However, as mentioned, it gets ignored for PHP 8.2. The PHP 8.2 module is correctly loaded for Apache.

I tried adding

SetEnv PHP_VALUE "upload_max_filesize=10M post_max_size=10M"

to the VirtualHost, however, it does not work either.

php_admin_flag engine Off is set for /home/*/public_html, however my sites are at /var/www/htdocs. This cannot be the issue.

Is there some PHP configuration missing? I am puzzled as to what causes the issue.