Thank you for posting in Microsoft Q&A forum.
This is mentioned in the article:
When installing a new site, after you have created and configured the availability group, direct setup to use the FQDN of the availability group listener. If you used a custom port and named instance, leave the instance name empty in the setup wizard and use the format FQDN of listener, port number. For example, use listener.contoso.com, 1445 for a named instance that doesn't use the default port of 1433.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".