I tried to replace original file with your gd.so attached, but i have this error:
PHP Warning: PHP Startup: Unable to load dynamic library 'gd.so' (tried: /opt/plesk/php/8.1/lib/php/modules/gd.so (libavif.so.13: cannot open shared object file: No such file or directory)...