It is the opposite, A is a leaf (A.is_leaf==True) and A[idx] is not (A[idx].is_leaf==False).
The thing is that A is the Tensor that contains all the parameters for which the gradients need to be computed.
If you do A[idx], then you access a subset of A in a diffentiable manner. So you get a new Tensor, that looks at a subset of A. It is not a leaf anymore as it was generated by a differentiable function (select in this case).