The renaming of GD shouldn't effect the captcha functionality. Perhaps you don't have GD installed in your php8 version? I think it is disabled by default and has to be enabled in the php.ini file.
The connection error is most likely not related to your php version either. Did you install the latest version of the extension? I did make some php8 fixes a couple of weeks back.