PodAntiAffinity/topologyspreadconstraints is not scheduling correctly when scale down the pods

I’m using PodAntiAffinity feature in Kubernetes deployment, it is working fine when we scale up the pods and scheduling the pods to the nodes
but I’m facing issues when scaling down the pods, like the example below
I have 3 nodes and 6 pods, when I’m trying to scale down to 3 replicas
the 3 pods are scheduled as 1 pod in 1st node and 2 pods in 2nd node …and in 3rd node it was not scheduling any pods
i was using below manifest file

apiVersion: apps/v1
kind: Deployment
metadata:
  name: dummy
  namespace: dummy
spec:
  replicas: 3
  selector:
    matchLabels:
      type: dummy
  template:
    metadata:
      labels:
        type: dummy
    spec:
      topologySpreadConstraints:
        - maxSkew: 1
          topologyKey: kubernetes.io/hostname
          whenUnsatisfiable: ScheduleAnyway
          labelSelector:
            matchLabels:
              type: dummy