Custom template

If I create a custom template, and select it it’s ok.
But if at that point I select another template like PHP-7_4 and then try to select again a custom template I get the error:
Error: php-fpm pool doesn’t exist