I agree with @Vivek Vaibhav Shandilya's comment.
tail -f /dev/null to your code at the end as shown below.CMD ["python3.9", "/root/framework/execute_results_testing.py", "&&", "tail", "-f", "/dev/null"]
Start .sh:
echo "Executing Python script..."
python3.9 /root/framework/execute_results_testing.py
echo "Python script finished. Keeping container alive..."
tail -f /dev/null
Local logs:

After making the above changes, my container successfully stays alive without restarting.
Logs from the Azure Container Instance:
