JF-17 is a collaboration between Pakistan & China with us providing the initial investment. It is a 4th gen aircraft.
F-35 is a 5th gen aircraft that only a select set of nations currently have access to. Signing up for F-35 means you stay on the right side of CATSAA.
If US can yank Turkey - a NATO member and a bulwark against Russia from the F-35 program, then providing F-35 to India along with it having S-400 would be very hard to justify.
An Apt analogy would have been China denying Pakistan J-31. J-31 is soemwhat comparable to F-35.
Collaboration or not, without China there would be no JF-17. Not sure how difference of 4th or 5th generation is going to impact a strategic discourse. These are their export jets for their allies. You are either an ally or you are not.
CATSAA is selectively applied to those who they think are not their allies but pretending to be - like Turkey or countries like Pakistan. Greek S-300s are not precluding them from purchasing F-35s. You are getting stuck in arguments that make no practical real politik sense.
The US is not a blind arbiter of fairness and justice like the statue of liberty, applying CAATSA fairly to the world as a guiding light. That would be a naive understanding of US policy, past present or future.
The US is a smart cookie. It knows what it wants, and gets it done. It makes rules and regulations to make it fit. The rules and regulations it makes (such as CAATSA) are designed to fulfill what it wants.
It is not like Pakistan - that makes decisions on what US policy makers say and then cry when they don't get it their way, in one case even after paying for it. Someday Pakistani policy makers will learn that the world isn't a fair place and the US is not the Fairy God Mother.
What does US want? It wants to contain China. Once we are able to wrap our head on that, everything becomes clear.