Spot instance not terminating after docker exited

We are using AWS batch in our application to process data. in compute environment we are using c5.large and c5d.large spot instances for execution for more than 8 months.

Till Thursday spot instances were getting terminated after execution if no new requests in batch queue.

since Friday we are observing that instances are not getting terminated for hours after execution, but request in batch queue Changing status from running to succeeded or failed depending on exit code from docker.

also if instance is running in idle state for hours it is getting reused if new request is in batch queue. so it means batch or spot fleet is able to track that instance is idle and can execute another request on it.

We have tried to use on demand instances in compute env with which termination is happening properly with same AMI and docker image.

Source: StackOverflow