Php configuration: Nextcloud does not read manually entered values from config.php

Nextcloud or php seems to cache the config.php. If I change the config.php with vi, then nothing changes in nextcloud. But if I change e.g. the smtp service in the GUI of nextcloud, the config.php is also changed.
After many installation attempts of nextcloud, redis, postgresql and switching to the database mariadb only a reinstallation of php solved the problem exactly once. After that it occurs again.
Concrete example:
I have added
'maintenance_window_start' => true,
but nothing happened. Only after reinstalling php I can’t get into nextcloud anymore. But after deleting this line nothing changes.
I noticed this problem by inserting the line
'default_phone_region' => 'DE',
but that did not fix the warning in nextcloud. Previously I had tried to update nextcloud from version 24.0.4 to 24.0.5. The update was probably almost ok, only the config.php still contains the version number
Everything are current versions: Ubuntu, nextcloud, databases, redis, php.
Also I had tried in between to disable in the php.ini the cache with
opcache.enable = 0
but that didn’t change anything either.