In a Docker Swarm cluster, the number of manager nodes required to maintain the quorum is calculated as (n/2)+1, where ‘n’ is the total number of manager nodes.

So, in the case of a 7 Manager Nodes cluster, the quorum is 5 ( (7/2) + 1 = 5 ), which means that the cluster can tolerate a maximum of 2 manager node failures.

However, in the case of a 7 Manager Nodes and 5 Worker Nodes cluster, even though it meets the quorum (which is 5), it cannot tolerate 3 manager node failures because it only has 7 manager nodes, and as mentioned above, the maximum number of manager node failures it can tolerate is 2.

but the only difference between the two conditions is the number of worker nodes (3 in a case, 5 in the other case), while the number of manager nodes is identical.
Could you check ?