Ok, I understand why it fails on @fredb74 side. It is because in post_install(), vercmp use the second argument ($2) instead of the first one ($1).
if [ "$(vercmp $2 7.3.5-1)" -lt 0 ]; then
As said in the manual for PKGBUILD, only one argument is passed to the function when executed, the version of the package that is installed.
Run right after files are extracted. One argument is passed: new package full version string.
Therefore, when the package is installed (which is the case when pamac package is replaced by pamac-gtk), the function doesn't receive the version of the package, but receive nothing instead. Thus, vercmp fails because $2 is nothing, the test fails because vercmp fails, the if fails, and the conf file is not replaced because the if failed.
@philm The post_install() need some changes so it works for folks on Stable (and those who have not updated yet on other branches). Of course, the version number used in vercmp will need to be changed too, so it works with the rebuild.
The code is fine for post_upgrade() though.