I read the "fine print" on the documentation related to homepage url, and realized that homepage url redirection only occurs when you access the application from myapps.microsoft.com or Microsoft 365 app launcher.
If you access the external url from a web browser, you will be redirected to the exact url you type in, after going through the Azure AD login process. So if you want to access the RDweb page directly from a web browser, you have to actually type in https://externalUrl/RDWeb
Unless you specifically redirect Default Web Site in IIS manager of RDWeb+RDGateway server to https://rds.mydomain.com/RDWeb. Then you can access https://externalUrl and be redirected to https://externalUrl/RDWeb (as long as you are using a custom domain, I have not tested this with the default .msappproxy.net domain)