tf.math.top_k gradient taping fails when `index_type=tf.int64`
@sachinprasadhs,
I was able to reproduce the issue on tensorflow v2.13, v2.12 and tf-nightly. Kindly find the gist of it [here](https://colab.research.google.com/gist/tilakrayal/50f0256d5649e35801e57272f337b38c/untitled1345.ipynb). hey @sachinprasadhs and @tilakrayal  i try to run the tf.math.top_k on a 1D array and its return a error with the index_type has a unexpected argument. is this same problem with you guys.

![image](https://github.com/tensorflow/tensorflow/assets/83540902/3d50218f-95ae-4840-8995-8fe47402dc03)

but in docs they have given this parameter. 🤔 

thank you

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

binary

### TensorFlow version

2.13.0

### Custom code

Yes

### OS platform and distribution

Ubuntu 22.04

### Mobile device

_No response_

### Python version

3.11

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

cuda_11.8.r11.8/compiler.31833905_0 / cuDNN version 8700

### GPU model and memory

NVIDIA GeForce RTX 2080 Ti

### Current behavior?

top_k gradient taping fails when `index_type=tf.int64`, unfortunately switching to `int32` leads to this other issue  https://github.com/tensorflow/tensorflow/issues/61692.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
import numpy as np

x = tf.Variable(np.ones((3, 3)))

with tf.GradientTape() as tape:
    y = tf.math.top_k(x, k=1, index_type=tf.int64)

dy_dx = tape.gradient(y, x)
```


### Relevant log output

```shell
tensorflow.python.framework.errors_impl.InvalidArgumentError: cannot compute AddV2 as input #1(zero-based) was expected to be a int64 tensor but is a int32 tensor [Op:AddV2] name:
```
