You’re missing by far the biggest disadvantage of the AMX-40, the gun handling.
The AMX-40’s turret is WW2 levels of slow, at 14.9 degrees/second stock for the horizontal traverse, which is actually slower than the Sherman and T-34 turret traverses.
The vertical traverse is also pretty bad for the tier, at 4.2 degrees/second. Not as bad as the Soviets, but a lot closer to them than other NATO MBTs.
Meanwhile, the 2K has Leopard 2 levels of horizonal traverse (At 23.8 degree/second), and much better vertical at 11.2 degrees/second.
This gives the Leo 2K a huge advantage in flexibility, with the ability to effortlessly react to new threats and engage multiple targets as well. This is a big deal at the tier, where you start to see both a switch to highly mobile, armored MBTs, and hordes of recklessly aggressive premium players who will just attempt to rush you from random angles with little to no warning.
Then there’s the 20mm. The AMX-40’s one is coaxially mounted. This ties it’s traverse to the turret, which is slow. Even worse, while it has some vertical traverse, it’s also mounted in the mantlet, meaning the gun vertical traverse also affects it. This means, if you want to engage a helicopter, you have to traverse up, which gets the gun on target, then wait as the gun overcorrects due to the mantlet also moving up, before it finally settles on target several seconds later.
Meanwhile, the 2K’s 20mm is in it’s own turret, with incredible turret traverse and great firing angles. It can also be used to poke from behind cover to engage very lightly armored vehicles without risking taking a hit in return.
Go ahead and find me any 8.7 round that cannot pen the AMX-40’s composite armor at up to a kilometer. I’ll wait.