Because get_grads is not a standard API. Why did you think that would work?
If you want to implement the training step yourself see this doc:

  
      

      TensorFlow
  

  
    

Customize what happens in Model.fit  |  TensorFlow Core 18