In your last example I think that probably there is something in the namespace:
import tensorflow as tf
from tensorflow.keras.backend import is_keras_tensor
from tensorflow.python.keras.engine import keras_tensor

y=keras_tensor.KerasTensor(tf.TensorSpec(shape=[None,10], dtype=tf.int32))
x=tf.keras.Input([10])
print(str(type(y)))
print(str(type(x)))
assert(isinstance(y,keras_tensor.KerasTensor))
assert(isinstance(x,keras_tensor.KerasTensor))

<class 'tensorflow.python.keras.engine.keras_tensor.KerasTensor'>
<class 'keras.engine.keras_tensor.KerasTensor'>

---------------------------------------------------------------------------

AssertionError                            Traceback (most recent call last)

<ipython-input-47-051d59c54d14> in <module>()
      9 print(str(type(x)))
     10 assert(isinstance(y,keras_tensor.KerasTensor))
---> 11 assert(isinstance(x,keras_tensor.KerasTensor))
     12 

AssertionError: 

/cc @Scott_Zhu is this expected or there is a small bug in the namespace?