Hello there,
Do you have any error message triggered in your Custom build ? Do you any inbound or outbound rules firewall rules that could block this connection ?
This could happens when there is either a network connectivity issue between your web browser and Azure Bastion (your client Internet firewall may be blocking WebSockets traffic or similar), or between the Azure Bastion and your target VM. Most cases include an NSG applied either to AzureBastionSubnet, or on your target VM subnet that is blocking the RDP/SSH traffic in your virtual network. Allow WebSockets traffic on your client internet firewall, and check the NSGs on your target VM subnet.
Troubleshoot Azure Bastion https://learn.microsoft.com/en-us/azure/bastion/troubleshoot
I hope this information helps. If you have any questions please let me know and I will be glad to help you out.
-------------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer--