Repository: pennylaneai/pennylane
Issue: [BUG] Qnode gradient transform does not work with TF

### Expected behavior

We should be able to use gradient transform on TF qnode
```
import pennylane as qml
import tensorflow as tf
dev = qml.device("default.qubit", wires=2)


@qml.qnode(dev, interface="tf")
def circuit(weights):
    qml.RX(weights[0], wires=0)
    qml.RY(weights[1], wires=0)
    return qml.expval(qml.PauliZ(0) @ qml.PauliZ(1))


weights = tf.Variable([0.1, 0.2])

with tf.GradientTape() as tape:
    res = qml.gradients.param_shift(circuit)(weights)

with tf.GradientTape() as tape:
    res = qml.gradients.finite_diff(circuit)(weights)

```

### Actual behavior

It fails because of the generation of shifted tapes.

### Additional information

_No response_

### Source code

_No response_

### Tracebacks

```shell
Traceback (most recent call last):
  File "/home/romain/PennyLane/pennylane/test/testp.py", line 30, in <module>
    res = qml.gradients.param_shift(circuit)(weights)
  File "/home/romain/PennyLane/pennylane/pennylane/gradients/gradient_transform.py", line 300, in jacobian_wrapper
    qjac = _wrapper(*args, **kwargs)
  File "/home/romain/PennyLane/pennylane/pennylane/transforms/batch_transform.py", line 295, in _wrapper
    tapes, processing_fn = self.construct(qnode.qtape, *targs, **tkwargs)
  File "/home/romain/PennyLane/pennylane/pennylane/transforms/batch_transform.py", line 412, in construct
    tapes, processing_fn = self.transform_fn(tape, *args, **kwargs)
  File "/home/romain/PennyLane/pennylane/pennylane/gradients/parameter_shift.py", line 1866, in param_shift
    return _param_shift_new(
  File "/home/romain/PennyLane/pennylane/pennylane/transforms/batch_transform.py", line 340, in __call__
    return self._tape_wrapper(*targs, **tkwargs)(qnode)
  File "/home/romain/PennyLane/pennylane/pennylane/transforms/batch_transform.py", line 430, in <lambda>
    return lambda tape: self.construct(tape, *targs, **tkwargs)
  File "/home/romain/PennyLane/pennylane/pennylane/transforms/batch_transform.py", line 412, in construct
    tapes, processing_fn = self.transform_fn(tape, *args, **kwargs)
  File "/home/romain/PennyLane/pennylane/pennylane/gradients/parameter_shift.py", line 1533, in _param_shift_new
    g_tapes, fn = expval_param_shift(
  File "/home/romain/PennyLane/pennylane/pennylane/gradients/parameter_shift.py", line 631, in expval_param_shift
    return _expval_param_shift_tuple(
  File "/home/romain/PennyLane/pennylane/pennylane/gradients/parameter_shift.py", line 519, in _expval_param_shift_tuple
    g_tapes = generate_shifted_tapes(tape, idx, op_shifts, multipliers, broadcast)
  File "/home/romain/PennyLane/pennylane/pennylane/gradients/general_shift_rules.py", line 425, in generate_shifted_tapes
    return tuple(
  File "/home/romain/PennyLane/pennylane/pennylane/gradients/general_shift_rules.py", line 426, in <genexpr>
    _copy_and_shift_params(tape, params, index, shift, multiplier)
  File "/home/romain/PennyLane/pennylane/pennylane/gradients/general_shift_rules.py", line 410, in _copy_and_shift_params
    new_params[idx] = new_params[idx] * qml.math.convert_like(
  File "/home/romain/PennyLane/penv/lib/python3.8/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/home/romain/PennyLane/penv/lib/python3.8/site-packages/tensorflow/python/framework/ops.py", line 7215, in raise_from_not_ok_status
    raise core._status_to_exception(e) from None  # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: cannot compute Mul as input #1(zero-based) was expected to be a float tensor but is a double tensor [Op:Mul]

Process finished with exit code 1
```


### System information

```shell
-
```


### Existing GitHub issues

- [X] I have searched existing GitHub issues to make sure the issue does not already exist.

Changed files:
pennylane/gradients/general_shift_rules.py

diff --git a/pennylane/gradients/general_shift_rules.py b/pennylane/gradients/general_shift_rules.py
index 4e73824a9..05e50be8e 100644
--- a/pennylane/gradients/general_shift_rules.py
+++ b/pennylane/gradients/general_shift_rules.py
@@ -407,9 +407,10 @@ def generate_shifted_tapes(tape, index, shifts, multipliers=None, broadcast=Fals
         """Create a copy of a tape and of parameters, and set the new tape to the parameters
         rescaled and shifted as indicated by ``idx``, ``mult`` and ``shift``."""
         new_params = params.copy()
-        new_params[idx] = new_params[idx] * qml.math.convert_like(
-            mult, new_params[idx]
-        ) + qml.math.convert_like(shift, new_params[idx])
+
+        new_params[idx] = new_params[idx] * qml.math.cast_like(
+            qml.math.convert_like(mult, new_params[idx]), new_params[idx]
+        ) + qml.math.cast_like(qml.math.convert_like(shift, new_params[idx]), new_params[idx])
 
         shifted_tape = tape.copy(copy_operations=True)
         shifted_tape.set_parameters(new_params)