Python can't be executed against private webapps if not accessible over public Application Load Balancer and throws error while running from the script section of the Workstation.
Error similar to below screenshot:

The Python runtime environment used inside Workstation operates in an infrastructure where it cannot directly access private network resources. Therefore, the endpoint (e.g., your web application or service) must be exposed via a publicly accessible ALB to allow the Python runtime to communicate with it.