I understand you want to know if there is any programmatic way to connect to VM using Azure Bastion without entering the username password. And you are already using the Get Bastion Shareable link.I think you can explore the option of using az network bastion tunnel
command to connect to your Azure VM and VS code using Remote SSH extension. You can refer to this tutorial here for more information on implementation.
Additional Reference:
https://learn.microsoft.com/en-us/azure/bastion/connect-vm-native-client-windows#tunnel-IP
If this does not satisfy you requirement, it will help if you could file feedback item with your use case for this request on our feedback portal here
Hope this helps! Please let me know if you have any additional questions. Thank you!
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.