Jenkins console is stuck and stopped throwing stdout at certain point when running python script which is running shell command on remote server

Jenkins setup: Jenkins run deploys docker container which then runs the test